Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Generating recursive hash

by bichonfrise74 (Vicar)
on Dec 12, 2009 at 07:15 UTC ( #812485=note: print w/replies, xml ) Need Help??

in reply to Generating recursive hash

Perhaps something like this?
#!/usr/bin/perl use strict; my %record; while (<DATA>) { next if /^id/; my @a = split; $record{$a[2]}->{$a[0]} = $a[1]; } __DATA__ id name parent 1 data 0 2 data 1 3 data 1 4 data 3 5 data 4

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://812485]
[stevieb]: Coding circles around Python devs, showing how unit tests should be done, enabling easy access to everything, learning basic C to wrap for direct hardware access... I am thankful.
[stevieb]: I'm in an appreciative mood. Thank you fellow Monks, for all I know, and for the knowledge which I can pass on

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2017-02-25 01:28 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (364 votes). Check out past polls.