This particular method is tried and proven, and should get you going in the right direction.
my @files = <DATA>;
chomp @files;
my @sorted = map { $_->[0] }
sort { $a->[1] cmp $b->[1] }
map { [ $_ , ( split /\s+/, $_ )[-1] ] }
@files;
print "$_\n" for @sorted;
__DATA__
1999-12-07 12:00p 3,856 abc.dll
2002-02-24 09:30p 260,096 xyz.dll
2004-03-19 01:29p 992,907 lmo.dll
2004-04-08 03:23p 24,576 efg.dll
2004-03-11 0804a 1,036,288 stu.dll
For an explanation, look up Schwartzian Transform.
This is, of course, just One Way To Do It. Here come the rest..........
|