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

Re^4: Finding hashes in hashes of hashes

by AnomalousMonk (Canon)
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.

    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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-12-01 04:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (792 votes), past polls