Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Too much Hash??

by Errto (Vicar)
on Jun 03, 2004 at 01:15 UTC ( [id://359865]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Too much Hash??
in thread Too much Hash??

What do you mean by "fails?" It would be helpful if you showed us what your expected output is and where the actual output differs. To me it looks like your code is working just fine. To get a better sense of what's actually going on, you might try replacing

foreach my $value (values %data){ print "$value\n"; }

with something more like

foreach my $value (values %data) { if (ref $value ne "HASH") { print "$value\n"; } else { print "$_\n" foreach values %$value; } }

The point being, that when creating your main hash, some of your values are strings, others are hash references. That's the way your code is designed, so you'll need to change your handling routines to accomodate it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-23 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found