in reply to Re^2: How do I print a quote with a perl one liner on dos?
in thread How do I print a quote with a perl one liner on dos?

when you print $whatever you don't need to print "$whatever" unless you want to print "$whatever and $something else in the same string" - that'll at least save you two backslashed double quotes.

that said, the point is that with the windows command shell the double quote is the string quoting character so in order not to have your perl -e code string stop at the next ", you have to escape it for the shell's benefit. to illustrate - escaping outside of the -e code: perl -e "print qq(@ARGV)" \"hello world\"

I guess the trick is that you use single quotes instead ;)

perl -e "$helloworld = qq('hello world'); print $helloworld"

   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"