develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119897] glob in threads is broken in perl5.18

Thread Previous | Thread Next
Eric Brine
September 24, 2013 17:36
Re: [perl #119897] glob in threads is broken in perl5.18
Message ID:
On Tue, Sep 24, 2013 at 9:32 AM, Brian Fraser <> wrote:

> Honestly that seems more useful than splitting on whitespace. Windows uses
> (and users use) spaces in filenames all the time, and whenever I do any
> sort of collab with a non-programmer those inevitably creep in.

Wouldn't be a big issue if you could escape the space, but you can't. Gotta
use bsd_glob instead.

>perl -E"say for glob 'c:\\program files\\*'"

>perl -E"say for glob 'c:\\program\ files\\*'"

>perl -MFile::Glob=bsd_glob -E"say for bsd_glob 'c:\\program files\\*'" |
find "Common"
c:\program files\Common Files

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About