in reply to READDIR - Sort by Time?

Um... no. readdir() is unsorted and you don't want to be making redundant stat() calls (being expensive n' all).

my @dirfiles = map { $_->[0] } sort { $_->[1] <=> $_->[1] } map { [ $_, stat $_ ] } grep( not m/^\.\.?$/, readdir ORDERS);