Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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


Comment on Re: Escape blank spaces

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 chilling in the Monastery: (16)
As of 2015-07-30 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls