in reply to Finding a file by age (Newest First)
How about:
my @files = sort {(stat $a)[9] <=> (stat $b)[9]} glob "$mask*"; print $files[$position - 1], "\n"; [download]