Hello again all,
I am working of a project that has me looking for palindromes. So far I have sussed out this much:
use strict; use warnings; my $palindrome = 'anna'; my $test = reverse $palindrome; print "$palindrome is a palindrome. \n" if $test = $palindrome;
I have two major challenges left.
First, as per Chargrill's point below, I think I need to delete all the white space to make sure I don't get 'A Danish custard--drat such sin, Ada's back at me.
Second, I only want to find palindromes with the lengnth of four characters or more , so 'bob' should not be printed.
Third, I need it to ignore capital letters, so 'Anna' should be printed. Is there a way to slap an 'i' on the back of this script or must I resort to a regex? Could this be combined with getting rid of white spaces?
Thanks for any pointers and your time!
-moxIn reply to Improving a palindrome script... by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |