Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: I've got a hash of hashes how do i get my values out

by hardburn (Abbot)
on Sep 10, 2004 at 16:11 UTC ( [id://390129]=note: print w/replies, xml ) Need Help??


in reply to I've got a hash of hashes how do i get my values out

For HoHes nested arbitrarily deep:

sub walk_hash { my $h = shift; foreach my $key (keys %$h) { if( ref $h->{$key}) { walk_hash( $h->{$key} ); } else { print $h->{$key}; } } }

This has been tested.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://390129]
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: (5)
As of 2024-03-28 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found