"...Why does the first code work, but not the second one? Can you help me understand..."
using this
gives the result you want on the second one.if (@array eq (reverse scalar @array)){..
In reply to Re: Palindrome array
by 2teez
in thread Palindrome array
by rnaeye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |