Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Arbitrarily Nested HoH

by llancet (Friar)
on Oct 15, 2010 at 05:53 UTC ( [id://865410]=note: print w/replies, xml ) Need Help??


in reply to Arbitrarily Nested HoH

use strict; use Scalar::Util qw/reftype/; my %hash_to_do sub do_hash { my $hash_ref = shift; foreach my $key (keys %$hash_ref) { my $value_type = reftype $hash_ref->{$key}; if ($value_type eq 'HASH') { do_hash($hash_ref->{$key}); } else { # do something else } } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found