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 is stdin in perl?
Write a program that shows the distinction between child and parent process?
How to get help for perl?
Why does Perl not have overloaded functions?
What is the use of -w, -t and strict in Perl?
How to determine strings length in perl?
Explain gmtime() function in perl?
How to print escaping characters inside a string in perl?
How do I replace every TAB character in a file with a comma?
what is the main function of fork() in cgi programming?
How can I display all array element in which each element will display on next line in perl ?
What is eval function in perl?
How to compare two strings in perl?
How to connect to SQL server through Perl?
Which operator in perl is used for the concatenation of two strings?