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

Re: Re: XML::Simple and arrays

by J9 (Beadle)
on Mar 07, 2003 at 15:13 UTC ( #241150=note: print w/replies, xml ) Need Help??

in reply to Re: XML::Simple and arrays
in thread XML::Simple and arrays

Thank you,

However when I try the above code I get this:
Type of arg 1 to keys must be hash (not hash element)
What does that mean?

Oh and it's on the grep { $_ eq $chk } keys %$rules->{CI}; line

Thanks for the help.

Replies are listed 'Best First'.
Re: Re: Re: XML::Simple and arrays
by arturo (Vicar) on Mar 07, 2003 at 16:29 UTC

    That should be grep { $_ eq $chk } keys %{ $rules->{CI} };, because without the braces, the % deferences the $rules hashref and not the $rules->{CI} hashref.

    See References quick reference for more illumination. HTH!

    If not P, what? Q maybe?
    "Sidney Morgenbesser"

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://241150]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2023-09-24 23:13 GMT
Find Nodes?
    Voting Booth?

    No recent polls found