in reply to strange map behavior
my %h = map {; $_ => $_ } @arr; ^ | force a block.
my @a = map +{ $_ => ord($_) }, @arr; ^ | force a hash
By the way, why are you using "$_" instead of just $_?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: strange map behavior
by jeanluca (Deacon) on Feb 25, 2008 at 19:24 UTC | |
by ikegami (Patriarch) on Feb 25, 2008 at 19:33 UTC |