my ($mask, $position) = @ARGV; print "Your file is: ".(grep {/^$mask/i} `ls -tr`)[$position-1];