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

Re^2: various hash construction/ printing questions..

by bryank (Acolyte)
on Jun 13, 2009 at 22:50 UTC ( #771312=note: print w/ replies, xml ) Need Help??


in reply to Re: various hash construction/ printing questions..
in thread how to construct tree from parent pointer list

Thanks,

That was very informative. What if I have three points of data.. say, child, parent, node name (ie descriptor)? Something like:

__DATA__ b:a:apples d:b:fuji apples <\c> <p> The structure would look something like: <p> <c> $VAR1 = { 'a' => { 'name' => 'fruit', 'child' => { 'b' => { 'name' => 'apples', 'child' => { 'd' => { 'name' +=> 'fuji apples' } } } } } };

Can your current algorithm be modified to work with this?


Comment on Re^2: various hash construction/ printing questions..
Download Code
Re^3: various hash construction/ printing questions..
by demerphq (Chancellor) on Jun 14, 2009 at 10:12 UTC

    Of course it can. :-)

    If you play around with it I'm sure you'll figure it out. :-)

    ---
    $world=~s/war/peace/g

      Hee hee. I did figure it out. Thanks for teaching me to fish, as it were. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-09-18 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (125 votes), past polls