true has asked for the wisdom of the Perl Monks concerning the following question:
outputs folder contents minus one file. Additionally, it also outputs "." and ".." in the array. Every other linux system i've been on usally just outputs the ".." Does anyone know why i am missing a file? SysAdmin tells me i cannot use readdir but i consider it a core function in my code i am really wondering why this is now a problem. Can anyone confirm this error? Anyone have any advice? Thanks for attention,opendir Tdir, "/path/to/anywhere"; my $dir = readdir(Tdir); while($dir = readdir(Tdir)){ print "$dir\n"; }close Tdir;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: readdir missing one file
by kyle (Abbot) on Oct 17, 2008 at 15:51 UTC | |
by true (Pilgrim) on Oct 17, 2008 at 16:00 UTC | |
by rev_1318 (Chaplain) on Oct 17, 2008 at 16:25 UTC | |
by mpeever (Friar) on Oct 17, 2008 at 17:08 UTC | |
by Illuminatus (Curate) on Oct 17, 2008 at 16:23 UTC | |
by blazar (Canon) on Oct 18, 2008 at 12:27 UTC | |
by ikegami (Patriarch) on Oct 17, 2008 at 17:05 UTC | |
by JavaFan (Canon) on Oct 17, 2008 at 17:26 UTC | |
by blazar (Canon) on Oct 18, 2008 at 12:18 UTC | |
|
Re: readdir missing one file
by Perlbotics (Archbishop) on Oct 17, 2008 at 16:57 UTC | |
|
Re: readdir missing one file
by ramtek (Novice) on Oct 17, 2008 at 17:19 UTC |