Answer Posted / kiruthikau
Try the following way.
Example
-------
use Data::Dumper;
my @dates = ( "02/11/2009" , "20/12/2001" , "21/11/2010" ) ;
@dates = sort { join( '', (split '/', $a)[2,1,0] ) cmp
join( '', (split '/', $b)[2,1,0]) } @dates;
print Dumper \@dates;
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
what are the two ways to get private values inside a subroutine or block?
How to open and read data files with Perl
Is there any way to add two arrays together?
You want to download the contents of a url with perl. How would you do that?
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
Explain lists ?
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 ?
What is the difference between use and require in perl?
Write syntax to use grep function?
How does polymorphism work in perl?
What are perl strings?
Write the program to process a list of numbers.
What are perl array functions?
How to dereference a reference?
In CPAN module, name an instance you use.