Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: transform array into a data structure

by calin (Deacon)
on Sep 29, 2007 at 19:29 UTC ( [id://641722]=note: print w/replies, xml ) Need Help??


in reply to Re: transform array into a data structure
in thread transform array into a data structure

Do I get a simple bonus if I turn your code into a one liner :)

my $h = pop @array; $h = {$_ => $h} for reverse @array;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 19:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found