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


in reply to Please help

Why don't you ask your teacher instead? This gives you a great opportunity to show you care about the class and it puts a face on your homework when it comes time to grade it.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: Please help
by Camerontainium (Initiate) on Mar 27, 2012 at 18:48 UTC

    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.
      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
      ... 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?