in reply to Hash of hash check if defined
Autovivification.
Change...
if(exists $ulm_keys{$h_tag}{$h_val}){....
... to ...
if( exists $ulm_keys{$h_tag} and exists $ulm_keys{$h_tag}{$h_val} ) { ...
...and see if that fixes things. What's happening is that currently as you test for the existance of $h_val, $h_tag is created automatically whether or not $h_val exists.
Here is Uri Gutman's tutorial on the subject.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash of hash check if defined
by Jup (Novice) on Feb 21, 2012 at 16:25 UTC |