On 10/9/09 Fri  Oct 9, 2009  2:12 PM, "Noah" <noah-l...@enabled.com>
scribbled:

> Hi there,
> 
> I am trying to figure out why the following lines are giving me an error:
> 
> 
> --- snip ---
> 
>              $found{filter}{$filter}{family}{$family} = 1;
>              print keys %{ $found{filter}{$filter}{family} };
> 
> 
> --- snip ----
> 
> here's the error
> 
> Can't use string ("1") as a HASH ref while "strict refs" in use at
> ./policy.sanitizer line 255.
> 
> 
> I am trying to the display all the keys for
> $found{filter}{$filter}{family} please

One of the values in your nested hash has the value 1 rather than a
reference to a hash. Without seeing how you generated your hash it is
impossible to say which element is in error.

Use the Data::Dumper module to inspect nested hashes:

    use Data::Dumper;

    print Dumper(\%found);



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to