Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Hash assignments using map

by chargrill (Parson)
on Feb 24, 2007 at 16:35 UTC ( #601888=note: print w/ replies, xml ) Need Help??


in reply to Hash assignments using map

There's no reason for that warning. You need to double check the code you're copying:

$ perl -Mstrict -we 'my @a = qw(a b c d); my %h = map { $_++ } @a' $ perl -Mstrict -we 'my @a = qw(a b c d e);my %h = map { $_++ } @a' Odd number of elements in hash assignment at -e line 1. $


--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)


Comment on Re: Hash assignments using map
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://601888]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-30 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls