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


Please Help Members By Posting Answers For Below Questions

How can I implement the function overloading in Perl ? I read about the operator overloading, I do not know how to implement the function overloading. Thanks in advance ?

2506


What is cpan ? What are the modules coming under this?

518


Explain strftime() function in perl?

547


What are different data types that perl supports. Elaborate on them.

561


What are the arguments and what do they mean in perl programming?

530






How to read from a pipeline with Perl

555


What are some common methods to all handles in perl?

514


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2009


what is perl language?

522


How would you ensure the re-use and maximum readability of your perl code?

528


Why does Perl not have overloaded functions?

541


What is perl unshift array function?

523


You want to download the contents of a url with perl. How would you do that?

509


Explain chop?

544


What does the q{ } operator do?

525