Your code claims 'abc' is a palindrome.
$test = $palindrome is an assignment. Wrong!
$test == $palindrome is a numerical comparison. Still wrong!
$test eq $palindrome is a string comparison. Good.
lc($test) eq lc($palindrome) is a case-insensitive string comparison. Bingo!
Perl's operators are documented in perlop.
In reply to Re: Improving a palindrome script...
by ikegami
in thread Improving a palindrome script...
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |