Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://643658]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2018-05-27 00:00 GMT
Find Nodes?
    Voting Booth?