note
ForgotPasswordAgain
<p>FWIW, I agree with everything you said. However, I think you made a little error:</p>
<p>
<code>
my @list = map( "$_ beads", @colors ), @grey_scale;
</code>
</p>
<p>
I think @list will not contain anything from @grey_scale, and would warn with something like "Useless use of private array in void context", because the assignment precedes the comma operator.
</p>
<p>I do prefer the expression form with parentheses, though, partly because of an (I believe) obsolete reason which was that the block form would generate a new lexical space whereas the expression form wouldn't, so the expression form was apparently slightly more performant (on very large lists).</p>
<p>I also like making hashes with something like...</p>
<p>
<code>
my %h = map +($_ => 1), @a;
</code>
</p>
<p>
...I guess because it seems the most generally correct, given the possible parsing bugs with Perl and map, but at the same time I can see that it's possibly confusing, especially given the "array in void context" comment above. :)
</p>
11119158
11119158