in reply to Re: What order do my files come from readdir() in?
in thread What order do my files come from readdir() in?

Thanks for your help everyone. I guess it might well be creation/modification order, yes, but the main point is that we don't know for sure and can't rely on it being consistent: the OS will return whatever it feels like.

Am I right, by the way, in thinking that the <=> operator will sort by leading numerals if it finds any?
--

($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;

Replies are listed 'Best First'.
Re: Re: Re: What order do my files come from readdir() in?
by jepri (Parson) on Jun 20, 2002 at 08:35 UTC
    Looks like it

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Re: Re: Re: What order do my files come from readdir() in?
by Anonymous Monk on Jun 20, 2002 at 18:30 UTC
    It's still probably better to use 'cmp' since you're doing a string comparison. Right tool for the right job sort of thing. In Perl, taking things on faith can come back and bite you in the ass when you least expect it.