9 my ($x, $y) = split /,/;
17 my ($axis, $val) = /fold along (.)=(\d+)/;
19 for my $x (keys %dots) {
20 for my $y (keys %{$dots{$x}}) {
21 if ($axis eq 'x' && $x > $val) {
22 $dots{2*$val - $x}{$y}++;
24 } elsif ($axis eq 'y' && $y > $val) {
25 $dots{$x}{2*$val - $y}++;
33 for my $x (keys %dots) {
34 $sum += keys %{$dots{$x}};