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)){..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Palindrome array
by LanX (Saint) on Dec 29, 2012 at 17:47 UTC | |
by 2teez (Vicar) on Dec 29, 2012 at 18:33 UTC | |
by AnomalousMonk (Archbishop) on Dec 29, 2012 at 20:18 UTC |