Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Hashes, Arrays, and Confusion -- In a bit over my head!

by Riales (Hermit)
on Mar 30, 2012 at 03:24 UTC ( #962520=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Hashes, Arrays, and Confusion -- In a bit over my head!
in thread Hashes, Arrays, and Confusion -- In a bit over my head!

tangent pretty much covered this, but I can expand a little bit more about the arrayref bit:

Like tangent said, the hashref $seen{$key}->{col1_vals} points to is an arrayref. To sum its contents, you can do something like this:

my $sum = 0; foreach (@{$seen{$key}->{col1_vals}}) { $sum += $_; }


Comment on Re^4: Hashes, Arrays, and Confusion -- In a bit over my head!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-12-26 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls