in reply to Re: How to list files in dir with respect to time ?
in thread How to list files in dir with respect to time ?

or even easier (and faster) with Sort::Key:
use Sort::Key qw(nkeysort); my @files_by_mtime = nkeysort { (stat)[9] } glob "$dir/*";