map {printf "%3d is a square\n" => $_ if (1 x $_) =~ /^$re$/} 1 .. $MAX;