Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Building dynamic nested hash references

by ysth (Canon)
on Jan 21, 2004 at 11:14 UTC ( [id://322839]=note: print w/replies, xml ) Need Help??


in reply to Building dynamic nested hash references

my $var; my @parts = grep length, split m#/#, $input; for ($var = $VAR1; @parts && $var; $var = $var->{shift @parts}) {} use Data::Dumper; print Dumper $var;
is how I'd do it. This is one of the few situations in which I feel strangely drawn to the c-style for loop.

Log In?
Username:
Password:

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

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

    No recent polls found