Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Escape blank spaces

by Zaxo (Archbishop)
on Jun 19, 2007 at 00:02 UTC ( #621900=note: print w/ replies, xml ) Need Help??


in reply to Escape blank spaces

That depends on whether a shell will interpret the command line that includes the file name. If it will, quotemeta should do it, along with handling lots of other gotchas.

$ perl -e'$_ = "foo bar baz"; print quotemeta, $/'
foo\ bar\ baz
$ 

If there is no shell interpretation, you probably don't need to escape them.

After Compline,
Zaxo

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-08-25 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (360 votes). Check out past polls.