Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Statement modifier thingie

by Anonymous Monk
on Mar 01, 2012 at 04:14 UTC ( [id://957089]=note: print w/replies, xml ) Need Help??


in reply to Re: Statement modifier thingie
in thread Statement modifier thingie

'K, I'll try to say it a different way: is there a way for me to use a statement modifier like print "$_\n" for 1..3 and add something to the end of it, like an extra newline, that doesn't mess with the loop but just gets printed after it? I've tried parens, brackets, commas, the dot, and mayonnaise with ketchup smeared nice and even, but none of it works (and some is pretty messy.) Is there a way to do it?

Replies are listed 'Best First'.
Re^3: Statement modifier thingie
by Anonymous Monk on Mar 01, 2012 at 04:32 UTC
    No.
      I kinda suspected that, especially when the ketchup didn't work. Well, that's two people saying no so far... anybody got a different opinion or a magic trick in your hat?

        Sure, here you go

        print "$_\n" for(1,2,3) ; print "\n\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-24 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found