There is no promise that the first two elements returned from a readdir are dot and dotdot, so this code is dangerously unportable. It might not even work on your own machine tomorrow.opendir(DIR, "/users/foo/"); @bar = readdir(DIR); closedir(DIR); for (1..2) {shift @bar;} #get rid of '.' and '..'
-- Randal L. Schwartz, Perl hacker
In reply to Re: Re: reading directories
by merlyn
in thread reading directories
by data67
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |