Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2019-07-17 12:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found