Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Windows quoting

by BrowserUk (Patriarch)
on Jul 21, 2008 at 14:46 UTC ( [id://699056]=note: print w/replies, xml ) Need Help??


in reply to Windows quoting

If the argument starts with \", we are out of luck (at least I have not found yet a way how to encode the string '\\"foo' properly for my batchfile

Using the following cmd file as the mechanism of demonstration (called echoem.cmd):

@echo off perl -wle"print qq['$_'] for @ARGV" %*

Does this achieve what you are after?

C:\test>echoem "\"foo" "bar \"qux" \\\"foo '"foo' ### $1 'bar "qux' ### $2 '\"foo' ### $3

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Windows quoting
by rovf (Priest) on Jul 22, 2008 at 08:31 UTC
    \\\"foo

    Indeed it does! Thanks a lot!

    -- 
    Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-19 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found