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
Is perl compiler or interpreter?
How do I generate a list of all .html files in a directory?
How can the user execute a long command repeatedly without typing it again and again?
Explain grooving and shortening of arrays?
What are the different types of perl operators?
What is cpan ? What are the modules coming under this?
Write a program to show the process of spawning a child process
What does a die() function do in perl?
What is the difference between single (') and double (") quote in a string in perl?
List the files in current directory sorted by size ?
What are the steps involved in configuring a server using cgi programming?
How to close a directory in perl?
what are prefix dereferencer and list them out?
Differentiate between c++ and perl.
What are the arguements we normally use for perl interpreter?