It seems that perl treat {+0,0} as a BLOCK and {0,0} an EXPR But why? Is that a special provision?
If I want to make sure that the {} is an anonymous hash whatever the braces contain, do I have to put a `+' before {} ?
thanks.
Why? Because it could be either, and the parser doesn't look far enough ahead to know for sure by the time it needs to decide.
Do you have to put a '+' before {} to have it be treated as an anonymous hash constructor regardless of the contents of the {}? Yes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With