in reply to Strange compiler behavior with map?

You need to disambiguate the curlies for the compiler. See the hashem and showem examples at Making References.

Replies are listed 'Best First'.
Re^2: Strange compiler behavior with map?
by Anonymous Monk on Sep 05, 2011 at 08:28 UTC
    Nice, I like {; natural to type (no need to press shift) and looks like a handlebar mustache
    my @f = 1 .. 3; # syntax error my %f = map { "$_" => 1 ; } @f; my %f = map {; "$_" => 1 } @f; print %f; __END__ 113121

    ;}) meat with salt ({: