Your first call to readdir goes into "my $dir" and then gets discarded by the next call in the condition of the while loop.
opendir my $Tdir, "/path/to/anywhere" or die "Can't opendir '/path/to/anywhere': $!"; my $dir; while($dir = readdir($Tdir)){ print "$dir\n"; } closedir $Tdir;
In reply to Re: readdir missing one file
by kyle
in thread readdir missing one file
by true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |