What Fletch siad about readdir. This is how I typically handle it however:
chdir $dirtoget; # Notice! opendir(IMD, '.') || die("Cannot open directory"); @thefiles = readdir(IMD); closedir(IMD); foreach $f (@thefiles) { if (-d $f) { print "$f<br>\n"; } }
Sometimes chdir isn't the best answer, but it often is.
In reply to Re: Problem pulling directories out of an array.
by duff
in thread Problem pulling directories out of an array.
by bkiahg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |