http://www.perlmonks.org?node_id=400278


in reply to Finding oldest file in directory

glob is actually implemented base on File::Glob since 5.6.0, so turn on GLOB_NOSORT might help a bit,as you want your own sort, not its sort any way.

use File::Glob ':glob'; @list = bsd_glob('*.*', GLOB_NOSORT); print join(',',@list);