Stas Bekman wrote: > May be it's just late and I need to sleep over it, but consider: > > map { $_ => 1 } (a..c); > map { $x = $_; "$x" => 1 } (a..c); > map { ("$_" => 1) } (a..c); > map { "$_" => 1 } (a..c); > > the first three lines are fine, the fourth produces an error: > > syntax error at /tmp/oops line 4, near "} (" > > what's wrong with $_ stringification as the key? and it only happens without > () around the key/value pair. Parsing issue : ambiguity blocks vs hash refs. See perldoc -f map (but I'm sure you know this already). Good night :)Thread Previous