in reply to Re: readdir return nul string
in thread readdir return nul string
Erm, that chomp in there is rather spurious. 99.99% of the time you're not going to have newlines on the end of filenames so it's useless overhead. And the remaining .01% of the time when you actually did have a newline on the end of the filename post-chomp you now no longer have the actual file name in your list.</nit>
(And you really want or not || in your opendir line.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: readdir return nul string
by Aim9b (Monk) on Sep 26, 2007 at 18:50 UTC | |
by Fletch (Bishop) on Sep 26, 2007 at 19:32 UTC | |
by Aim9b (Monk) on Sep 27, 2007 at 21:50 UTC |