Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-02-07 22:06 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (261 votes), past polls