in reply to if (-d$_) failes because of white space

Works for me, are you sure you are not passing these names through the command-line (@ARGV) and missing quotes? Or maybe you are using < > globbing?
  • Comment on Re: if (-d$_) failes because of white space