in reply to if (-d$_) failes because of white space
Could you provide a wider picture of the issue, perhaps an ls -lR of the directory structure and a larger code snippet?mkdir test\ this perl -e 'opendir (DIR,"./");@files = readdir DIR;foreach $file (@files +){print "$file is a directory\n" if (-d $file);}' test this is a directory .. is a directory . is a directory
|
|---|