How to sort dates in Perl ?
Answer / 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 |
Explain the various characteristics of perl.
Comment on the scope of variables in perl.
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
How to connect to SQL server through Perl?
Explain string comparison operators in perl.
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)
Explain goto name?
What is the difference between use and require in perl programming?
Explain regular expression in perl?
What is perl scripting?
Why do you use only Perl when there a lot of more languages available in market like C, Java?
What does the qx{ } operator do?