bkiahg has asked for the wisdom of the Perl Monks concerning the following question:
All it's printing is the . and .. Any suggestions?opendir(IMD, $dirtoget) || die("Cannot open directory"); @thefiles = readdir(IMD); closedir(IMD); foreach $f (@thefiles) { if (-d $f) { print "$f<br>\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem pulling directories out of an array.
by Fletch (Bishop) on Feb 02, 2004 at 18:08 UTC | |
|
Re: Problem pulling directories out of an array.
by tachyon (Chancellor) on Feb 02, 2004 at 18:09 UTC | |
|
Re: Problem pulling directories out of an array.
by welchavw (Pilgrim) on Feb 02, 2004 at 18:48 UTC | |
|
Re: Problem pulling directories out of an array.
by duff (Parson) on Feb 02, 2004 at 18:12 UTC | |
|
Re: Problem pulling directories out of an array.
by Limbic~Region (Chancellor) on Feb 02, 2004 at 18:11 UTC | |
by bkiahg (Pilgrim) on Feb 02, 2004 at 18:40 UTC |