Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Multi Dimensional Hashes

by chas (Priest)
on Jun 07, 2005 at 03:19 UTC ( [id://464135]=note: print w/replies, xml ) Need Help??


in reply to Multi Dimensional Hashes

It depends a lbit on exactly what you want to extract, but $returnedData is a reference to a hash; that hash is %{$returnedData}. Its values are references to hashes. You can use the keys function on %{$returnedData}, for example. You can print "everything" by something like:
%HoH=%{$returnedData}; foreach $x(keys %HoH){ print "$x: "; foreach $y (keys %{$HoH{$x}}){ print "$y=$HoH{$x}{$y} "; } print "\n"; }

You can use $returnedData directly without %HoH, but it is a bit more complicated to read.
chas
(Update: A lot of replies appeared while I was writing my reply...)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found