Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by haukex (Archbishop)
on Apr 16, 2021 at 14:49 UTC ( [id://11131383]=note: print w/replies, xml ) Need Help??


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

The quoting gets lost when the shell parses the command line arguments.

I'm not an expert, but I thought that part of the issue is that on Windows, that's actually not what happens? I'm looking at Re^3: Perl Rename.

Update: Unless with that sentence you were referring to *NIX systems, in which case you're right of course.

Replies are listed 'Best First'.
Re^3: (Windows) verbatim command line arguments inside Perl script
by haj (Vicar) on Apr 16, 2021 at 15:42 UTC

    Ah, you're correct, of course. That was my initial thought (because that's how it is done in Linux), but then I read the docs of Win32::ShellQuote which tells a different story:

    Windows passes its arguments as a single string instead of an array as other platforms do.
    - and then I copied a presumably relevant part of that docs into my reply without correcting the first sentence.

    BTW: Windows has other ... interesting ... challenges when parsing command line arguments. Try this:

    perl -E "say @ARGV" €

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-29 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found