in reply to sort by date

mito,
You could use the Schwartzian Transform.
@allPictures = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_ , (stat($_))[9] ] } @allPictures;
Cheers - L~R