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

Re: Check for existance in a hash of hashes

by PrakashK (Pilgrim)
on Mar 27, 2002 at 19:03 UTC ( #154768=note: print w/ replies, xml ) Need Help??


in reply to Check for existance in a hash of hashes

sub print_data { my %hoh = %$skip_users; next if ((exists $hoh{$user}) && (exists $hoh{$user}{$command})); }
I wonder if the next if ... part is a typo. This should throw up an error unless print_data is called inside a loop.

Do you mean:

print $hoh{$user}{$command} if ((exists $hoh{$user}) && (exists $hoh{$user}{$command}));

/prakash


Comment on Re: Check for existance in a hash 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://154768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2014-10-22 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls