in reply to Problem pulling directories out of an array.
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.
|
|---|