Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Christmas Tree

by mtve (Chaplain)
on Jan 11, 2009 at 11:56 UTC ( #735490=note: print w/ replies, xml ) Need Help??


in reply to Re: Christmas Tree
in thread Christmas Tree

printf"%22s%s\n",$_%=21,$_=4**$_,y/0/"/cfor 1..22

Happy New Year! :)


Comment on Re^2: Christmas Tree
Download Code
Re^3: Christmas Tree
by LanX (Canon) on Jan 11, 2009 at 17:55 UTC
    Thanx, and a happy new year for you too! 8 )

    I have to admit I was confused by your example, it's important to understand that printf takes his parameters by reference and not by value!

    So it's possible to still influence $_ in the last parameter with effect for the first!

    Very insightful, thanx a lot!

    Cheers Rolf

      Well, it's a bit complicated, but yes, all perl functions take parameters by reference.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-07-31 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (253 votes), past polls