write a script to display mirror image of a entered value
and also check whether Palindrome
Answer Posted / dheeraj
print("Enter the no. to check for Palindrome : ");
my $no = <STDIN>;
chop($no);
my $rev =reverse($no);
print "Palindrom \n" if ($rev eq $no);
#Perl cannot identify the datatype until we force operation
on it;
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What are the advantages of programming in perl?
What is “grep” function in perl?
What are the reasons that cookie server can’t handle multiple connections?
Explain the difference between "my" and "local" variable scope declarations. ?
How to sort arrays in perl?
What is chomp() operator/function?
How can you call a subroutine and identify a subroutine?
how to connect cisco switch uisng perl script
How to convert strings into an array in perl?
Distinguish my and local?
How can you use Perl warnings and what is the importance to use them?
What is boolean context?
Explain chop?
List the operator used in Perl?
How to change a directory in perl?