Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: hash problem

by sacked (Hermit)
on Jul 09, 2004 at 19:57 UTC ( [id://373249]=note: print w/replies, xml ) Need Help??


in reply to hash problem

sub make_hash { my $keys= shift; return 1 unless $keys and @$keys; + my $key= shift @$keys; + return { $key => make_hash( $keys ) }; } + my $hash= make_hash( [qw(one two three)] ); + use Data::Dumper; print Dumper $hash; + __END__ $VAR1 = { 'one' => { 'two' => { 'three' => 1 } } };

--sacked

Log In?
Username:
Password:

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

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

    No recent polls found