Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: (Windows) verbatim command line arguments inside Perl script

by ikegami (Patriarch)
on Apr 19, 2021 at 21:17 UTC ( [id://11131482]=note: print w/replies, xml ) Need Help??


in reply to (Windows) verbatim command line arguments inside Perl script

Is there any way to access the "raw" command-line in order to catch quoting and escaping?

Wrong question. You are trying to build a shell command, so the question is how to convert strings into shell command arguments. For that, there's Win32::ShellQuote's quote_cmd.

use Win32::ShellQuote qw( quote_cmd ); say quote_cmd("some_cmd", @ARGV);

Seeking work! You can reach me at ikegami@adaelis.com

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-24 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found