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
In reply to Re: Reverse a Word - without reverse??
by hv
in thread Reverse a Word - without reverse??
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |