Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Odd behavior in hash initialization due to missing parens

by naikonta (Curate)
on Oct 09, 2007 at 10:21 UTC ( #643658=note: print w/ replies, xml ) Need Help??


in reply to Odd behavior in hash initialization due to missing parens

Welcome to the greediness of list construct.

The commas in the hash are pair separator. After the sprintf they become argument separator for sprintf, and without the parens it lasts until the last scalar (48 in this case). With parens, the commas as argument separator for sprintf are only before the closing paren. The closing paren itself acts as argument terminator for sprintf, separating it as an execution unit from the rest of the pairs. After the closing paren, commas become pair separator again.


Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!


Comment on Re: Odd behavior in hash initialization due to missing parens
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-07-26 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls