jpfarmer has asked for the wisdom of the Perl Monks concerning the following question:
I have an application where I use readdir to iterate over the files in a directory handle opened by opendir. Perldoc gives the following explanation of how the function works:
Returns the next directory entry for a directory opened by "opendir".
However, it does not specify how "next" is determined. From my own quick testing, it appears that the order is consistent, but I have not been able to discern how the order is derived and it does not appear to be documented anywhere.
Do any of you know how the order is determined?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Order of files returned by readdir
by Fletch (Bishop) on Mar 01, 2006 at 20:20 UTC | |
|
Re: Order of files returned by readdir
by GrandFather (Saint) on Mar 01, 2006 at 20:55 UTC | |
|
Re: Order of files returned by readdir
by superfrink (Curate) on Mar 02, 2006 at 02:56 UTC | |
by Jim_Gillespie (Initiate) on Mar 02, 2006 at 14:49 UTC | |
by Anonymous Monk on Mar 02, 2006 at 20:30 UTC | |
by ayrnieu (Beadle) on Mar 06, 2006 at 10:06 UTC | |
|
Re: Order of files returned by readdir
by Argel (Prior) on Mar 02, 2006 at 01:48 UTC | |
by helgi (Hermit) on Mar 02, 2006 at 11:38 UTC | |
|
Re: Order of files returned by readdir
by leocharre (Priest) on Mar 06, 2006 at 14:14 UTC |