- or download this
#!/usr/bin/perl
...
{printf "%3d is a square\n" => $_ if (1 x $_) =~ /$re/}
do {printf "%3d is a square\n" => $_ if (1 x $_) =~ /$re/} for 1 .. $
+MAX;
map {printf "%3d is a square\n" => $_ if (1 x $_) =~ /$re/} 1 .. $
+MAX;
- or download this
1 is a square
4 is a square
...
36 is a square
49 is a square
Out of memory!
- or download this
1 is a square
4 is a square
...
49 is a square
64 is a square
Out of memory!