http://www.perlmonks.org?node_id=1010843


in reply to Palindrome array

BTW, why array? I just cheated this from Re^2: palindrome using regular expressions...

#!/usr/bin/perl + use strict; use warnings; my $palindrome = 'lagerregal'; my $check = reverse $palindrome; print "yes\n" if $check eq $palindrome; $palindrome='xamax'; $check = reverse $palindrome; print "still yes\n" if $check eq $palindrome; __END__

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»