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

Re^4: Finding hashes in hashes of hashes

by AnomalousMonk (Monsignor)
on Dec 28, 2009 at 20:07 UTC ( #814658=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Finding hashes in hashes of hashes
in thread Finding hashes in hashes of hashes

bobf is quite right: the statements
    my @args = @_;
    my $who = shift @args;
    my $families = shift @args;
are much better written as
    my ($who, $families) = @_;

Also,  $families in the above example seems to be a hash reference,
so use  %$families to dereference.

Further,
    for my $family (%$families) { ... }
won't do what you want; use
    for my $family (keys %$families) { ... }
to iterate over the keys of the referenced hash.


Comment on Re^4: Finding hashes in hashes of hashes
Select or Download Code

Log In?
Username:
Password:

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

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

    April first is:







    Results (565 votes), past polls