http://www.perlmonks.org?node_id=962003


in reply to Re: Please help
in thread Please help

Your code is broken:

D:\progs\perl>palindrome.pl Enter a word... noon PALINDROME D:\progs\perl>palindrome.pl Enter a word... ipswich PALINDROME D:\progs\perl>palindrome.pl Enter a word... bolton PALINDROME

The line

    unshift @userinput, chop $user;

needs to be changed to

    push @userinput, chop $user;