printf/sprintf take a list of arguments. In the first case sprintf gobbles up all the remaining items in the hash initialization list (even though the format string doesn't require them). In the second case the list that sprintf sees is constrained by the parens.
Note that => and , (comma) are in essence the same except that => stringizes the item to the left of it.
In reply to Re: Odd behavior in hash initialization due to missing parens
by GrandFather
in thread Odd behavior in hash initialization due to missing parens
by thezip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |