http://www.perlmonks.org?node_id=1024908

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello there, dear Perl Monks,

I'm not sure if this is a know bug, but it's very weird.
my %opt; my @vals = qw(title artist album); my @opts = map { "$_=s" => \$opt{$_} } @vals;
It says:
Not enough arguments for map at test.pl line 3, near "} @vals" syntax error at test.pl line 3, near "} @vals" Execution of test.pl aborted due to compilation errors.
It can be very easy reproduced:

map { "x" => $y } qw(1 2 3);

and says:
Not enough arguments for map at test.pl line 1, near "} qw(1 2 3)" syntax error at test.pl line 1, near "} qw(1 2 3)" Execution of test.pl aborted due to compilation errors.
Any thought on this issue is appreciated. Thank you very much.