Perl_User has asked for the wisdom of the Perl Monks concerning the following question:
If I user the || instead of &&, it skips over the $hoh{$user}. But I want it to check for both the keys. I cannot seem to get the correct syntax for that.my $skip_users = &get_data; &print_data; sub get_data { my %skip_users; #build a hoh with userid and value. $skip_users{$skip_id}{$value}++; return(\%skip_users) } sub print_data { my %hoh = %$skip_users; next if ((exists $hoh{$user}) && (exists $hoh{$user}{$command})); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Check for existance in a hash of hashes
by Ovid (Cardinal) on Mar 27, 2002 at 18:56 UTC | |
|
Re: Check for existance in a hash of hashes
by Fletch (Bishop) on Mar 27, 2002 at 18:27 UTC | |
by dragonchild (Archbishop) on Mar 27, 2002 at 18:46 UTC | |
by Fletch (Bishop) on Mar 27, 2002 at 18:51 UTC | |
by dragonchild (Archbishop) on Mar 27, 2002 at 18:57 UTC | |
|
Re: Check for existance in a hash of hashes
by moebius (Novice) on Mar 27, 2002 at 18:55 UTC | |
|
Re: Check for existance in a hash of hashes
by PrakashK (Pilgrim) on Mar 27, 2002 at 19:03 UTC | |
|
Re: Check for existance in a hash of hashes
by trs80 (Priest) on Mar 28, 2002 at 04:51 UTC | |
|
Re: Check for existance in a hash of hashes
by Perl_User (Acolyte) on Apr 01, 2002 at 19:56 UTC |