in reply to Re: Sort files descending by date
in thread Sort files descending by date
(\d\d\d\d_\d\d_\d\d_\d\d_\d\d_\d\d_\d\d\d)
Perhaps it's just me but I find all those \ds confusing and would prefer to use quantifiers.
(\d{4}(?:_\d\d){5}_\d{3})
Also, the requirement was for a descending sort so I think
sort { $a->[1] cmp $b->[1] }
should be
sort { $b->[1] cmp $a->[1] }
Cheers,
JohnGG
Update: I should have read the OP more carefully, the sort required is actually ascending as fenLisesi points out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sort files descending by date
by fenLisesi (Priest) on Jun 19, 2007 at 09:53 UTC | |
by johngg (Canon) on Jun 19, 2007 at 10:08 UTC |