Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 ( #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? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2022-11-27 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?