Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: quoting/escaping file names

by Corion (Patriarch)
on Sep 09, 2014 at 07:11 UTC ( [id://1099949]=note: print w/replies, xml ) Need Help??


in reply to Re^2: quoting/escaping file names
in thread quoting/escaping file names

You want to quote the string properly for your shell. Most likely String::ShellQuote will do what you want.

Replies are listed 'Best First'.
Re^4: quoting/escaping file names
by afoken (Chancellor) on Sep 10, 2014 at 17:46 UTC
    You want to quote the string properly for your shell.

    Perhaps. Or better, avoid the shell and use the list form of system or exec, as documented in perlipc. (Unless, of course, we're talking about Windows, where the quoting rules can differ from program to program because programs are invoked with a single argument string instead of a list of arguments.)

    Most likely String::ShellQuote will do what you want.

    No. It did not keep its promise in 2005, and despite a minor update, it still does not in 2014. It still lacks support for any shell except that one unnamed and unversioned shell the author tested against. It still lacks proper tests, and it still does not support Windows, DOS, OS/2, and any other OS that does not exclusively use a bourne shell.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      The fact that it only supports one family of shells is not a bug.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2024-04-23 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found