in reply to Reverse a Word - without reverse??
This can be done quite straightforwardly with a recursive regexp:
our $pal = qr{ .? | (.) (??{$pal}) \1 }x; sub is_palindrome { shift =~ /^$pal\z/; }
Don't expect it to be particularly efficient. :)
Hugo
|
|---|