Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Spaces in folder names...

by ikegami (Pope)
on Oct 14, 2009 at 04:02 UTC ( #801014=note: print w/ replies, xml ) Need Help??

in reply to Re: Spaces in folder names...
in thread Spaces in folder names...

It has nothing to do with the shell. Despite an origin in csh, glob patterns are system independent*. Space is special to glob. It indicates a separation of patterns. For example, glob('*.h *.c') will return all C source and C header files.

Surrounding the pattern in quotes will fail. Quotes aren't special to glob. The space can be escaped using "\". However, it's simpler to just call bsd_glob. bsd_glob is the function that implements glob, but it doesn't treat spaces specially when it's called directly.

* — Almost. IIRC, "\" is treated literally in Windows when it isn't followed by a special character. This doesn't matter here.

Comment on Re^2: Spaces in folder names...
Select or Download Code
Replies are listed 'Best First'.
Re^3: Spaces in folder names...
by swampyankee (Parson) on Oct 14, 2009 at 20:45 UTC

    I was thinking that it did have something to do with the shell because he was getting the value for his input folder from $ARGV[0]. Since bsd_glob seemed to work with no other changes, I'll accept that the shell was not relevant.

    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://801014]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-11-27 21:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls