Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Finding hashes in hashes of hashes

by AnomalousMonk (Abbot)
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 making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-12-22 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (131 votes), past polls