in reply to Re^2: Sort directories by date
in thread Sort directories by date
"...why would you want to populate a hash and use sort..."
Because i had no better idea :-(
Update: No, wait:
use strict; use warnings; use feature qw (say); use List::Util qw(max); use Time::Piece; my @dates = qw{ 12112014 01052015 02202015 03102015 01012011 04092015 09092015 }; say localtime( max map { Time::Piece->strptime( $_, "%m%d%Y" )->epoch +} @dates ) ->strftime("%m%d%Y"); __END__ \Desktop\monks>other_idea.pl 09092015
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|