in reply to Re: Print the oldest file in a directory.
in thread Print the oldest file in a directory.

Doh! "glob *" is already sorted!

Try again with a truly random order.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Re: Print the oldest file in a directory.

Replies are listed 'Best First'.
Re: •Re: Re: Print the oldest file in a directory.
by gnu@perl (Pilgrim) on Oct 31, 2002 at 16:02 UTC
    Yup, DOH!. Technically I don't even need the <=>. I could just take the last output of glob. Still en expensive way of doing it. After reviewing the input here it would definately be better to perform an ST on an array populated using opendir/readdir.

    Thanks for your input everybody.