in reply to Whitespace protection in glob expression for Windows network paths

use File::Glob 'bsd_glob'; my $path = "c:/Program Files"; # $path =~ s/ /[ ]/g; # Oh, not even required print $_, $/ for bsd_glob("$path/*");

- tye        

  • Comment on Re: Whitespace protection in glob expression for Windows network paths (bsd_glob)
  • Download Code

Replies are listed 'Best First'.
Re^2: Whitespace protection in glob expression for Windows network paths (bsd_glob)
by Another Ed (Sexton) on Nov 12, 2014 at 11:24 UTC
    Thanks tye - same suggestion as RichardK's, but with nice succinct code. I've ended up adopting the bsd_glob solution in my scripts, and it works well.