Split out the bits of the datetime your interested in using substr.
my $dt = '20090405022100'; my $d = substr $dt,0,8; my $t = substr $dt,8;
Then read the perlfaq on sort How do I sort an array by (anything)?
In reply to Re: Date to be sorted in descending and time in ascending
by RichardK
in thread Date to be sorted in descending and time in ascending
by karthik7887
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |