in reply to map EXPR - what's an EXPR?
So what you write is parse as $_, 2 * $_, 1..10, so 2 * $_ is the first item of the list.
$ perl -MO=Deparse -e 'my %foo = map( $_ => 2*$_, 1..10 );' my(%foo) = map($_, 2 * $_, 1..10);
In general terms an EXPR is everything that returns a value, but EXPR, LIST means that there has to be a decision where EXPR ends and LIST starts, and that's the first comma.
|
|---|