On Sat, 2007-05-05 at 07:19 -0700, Tom Phoenix wrote:
> On 5/5/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
> 
> >     foreach my $child (sort keys( $parent{$pid} )) {
> >         dump_process( $child );
> >     }
> >
> > Type of arg 1 to keys must be hash (not hash element) at ./visualise.cgi
> > line 46, near "} )"
> 
> That's saying that you're giving the keys() operator a hash element,
> but it needs a hash. Is $parent{$pid} a reference to a hash? If so,
> you can dereference it as a hash:
> 
>     keys( %{ $parent{$pid} } )
> 
> Now the argument to keys() is the hash whose reference was in $parent{$pid} .

Thanks,  I tried %$parent{$pid} and %($parent{$pid}) but not %{}.

Seems to work now.  Back to making this work :-)

Ta
Ken


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to