good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Sort files by date in the file name.by kcott (Archbishop) |
on Jul 08, 2016 at 08:43 UTC ( [id://1167446]=note: print w/replies, xml ) | Need Help?? |
G'day leoberbert, I think this does what you want:
Output:
The construct I've used here is known as a Schwartzian Transform. This sorts first on column1 and then on column3, both in ascending order; this should put your wanted file in $sorted[0]. If that's not what you want, modify the sort { ... } code to suit. — Ken
In Section
Seekers of Perl Wisdom
|
|