in reply to Palindrome array
"...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)){..
Does that help or solve the puzzle by any means?
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
In Section
Seekers of Perl Wisdom