in reply to Re^11: Why? (each...)
in thread Why? (each...)

Counter example:
sub g { return { ... } } sub h { return { ... } } my $hash = (f ? g : h);

Replies are listed 'Best First'.
Re^13: Why? (each...)
by Argel (Prior) on May 14, 2011 at 02:58 UTC
    Using curly braces when parens were supposed to be used is right there, in the OP!! Hey, maybe that could be the context...? Why is that so hard to grasp? No matter. I think I finally understand why you and BrowserUK tangle from time to time! Well, I have been discussing this in a certain context the entire time and as best I can tell, you have not made an effort to grasp that. So, have a good weekend.

    Elda Taluta; Sarks Sark; Ark Arks

      You said that parens when assigning to a hash indicates a list and not a hash reference. In that very context, I showed that's wrong. If anyone followed your advice, and used %hash instead of $hash, their code would be buggy.

        The context is %hash, not $hash. The mistake in the OP was using {} when he should have used ().

        Elda Taluta; Sarks Sark; Ark Arks