in reply to Finding a file by age (Newest First)

Not familiar with aix, but if your 'ls' supports it then:
my ($mask, $position) = @ARGV; print "Your file is: ".(grep {/^$mask/i} `ls -tr`)[$position-1];

Replies are listed 'Best First'.
Re^2: Finding a file by age (Newest First)
by Roy Johnson (Monsignor) on Jun 04, 2004 at 18:38 UTC
    You might want to make that ls -Atr

    The PerlMonk tr/// Advocate
      In this example, I'd skip Perl altogether.
      ls -At| grep '^te' | head -2 | tail -1

      Dave.