$ mkdir "dir with spaces" $ touch "dir with spaces"/haha $ perl -e '@x = glob("dir with spaces/*"); warn @x' dirwith at -e line 1. $ perl -e '@x = glob("dir\\ with\\ spaces/*"); warn @x' dir with spaces/haha at -e line 1.