Second program which doesn't execute#!/usr/bin/perl # Palindrome.pl $x=<STDIN>; chomp($x); $y=reverse($x); if($x eq $y) { print "Palindrome"; }
#!/usr/bin/perl # Palindrome.pl if((chomp($x=<STDIN>)) eq ($y=reverse($x))) { print "Palindrome"; }#not showing appropriate result. also I am not able watch the express +ion $x and $y in debug mode.
In reply to why the 2nd program doesn't work? by rockmountain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |