in reply to Re: Please help
in thread Please help

Thank you everyone but I did ask my teacher.

if ($a == $i && $b == $h && $c == $g && $d == $f) #Final configurat +ion to tell if it is a palindrome { print "PALINDROME!"; } else { print "NOT A PALINDROME!"; }
That was all i needed to do. I overthought the assignment.

Replies are listed 'Best First'.
Re^3: Please help
by Tux (Canon) on Mar 27, 2012 at 19:23 UTC
    print "\nThis program asks for you to \n enter any nine character sequence and \n then tells you if it is a palidrome!\n\n";

    Hmm, so the program asks for a character sequence, and you end up using numercal equasions. That will yield a whole lot of palidromes (and warnings if you did use warnings)

    say $a eq $i && $b eq $h && $c eq $g && $d eq $f ? "PALINDROME!" : "No +t a PALINDROME!";

    much simpler:

    $user eq reverse $user and say "You entered a PALINDROME!";

    Enjoy, Have FUN! H.Merijn
Re^3: Please help
by ww (Archbishop) on Mar 27, 2012 at 19:51 UTC
    ... hummm...

    I don't see the chop you originally said the teacher wanted you to use.

    And are you sure the teacher didn't say chomp?