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

Re^2: How to print a newline in oneliners ...

by Not_a_Number (Prior)
on Apr 22, 2014 at 19:25 UTC ( [id://1083223]=note: print w/replies, xml ) Need Help??


in reply to Re: How to print a newline in oneliners ...
in thread How to print a newline in oneliners ...

Yeah, that's what I was wondering. What about:

perl -E 'say for 1..10'

Update: I hadn't seen karlgoethebier's answer to Laurent_R when I posted this...

Replies are listed 'Best First'.
Re^3: How to print a newline in oneliners ...
by Anonymous Monk on Apr 22, 2014 at 19:31 UTC

    It's good, but -E doesn't work on the old Perls that are still around. Instead of trying to remember what the Perl version on the current system happens to be, or asking people what version of Perl they're running before giving them a one-liner to use, I've just gotten in the habit of staying backwards compatible and writing perl -le 'print for 1..10'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-24 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found