Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: why does -e work and not \n on strawberry perl

by no_slogan (Deacon)
on Jun 05, 2014 at 03:31 UTC ( [id://1088770]=note: print w/replies, xml ) Need Help??


in reply to why does -e work and not \n on strawberry perl

Double quotes usually work better for enclosing command-line scripts in windows shells. Also, windows shells typically add a newline, so you can leave off printing one at the end of your script. If you need \n to work, try using a qq string, like this:

perl -e "print qq[Howdy\nWorld\n]"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-20 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found