in reply to if (-d$_) failes because of white space
Not enough info. There are two likely possibilities (neither of which have anything to do with -d).
Are you using glob without realizing that spaces are metacharacters for glob? Use File::Glob's bsd_glob instead. It's the same function, but it treats spaces as "ordinary" characters.
Are you using the result of readdir (an unqualified file name) without prepending the path of that file name?
|
|---|