Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: store parent child relation

by turo (Friar)
on May 18, 2006 at 04:13 UTC ( [id://550181]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to store parent child relation

I've made a wide exploration of the tree, without recursion, the result is akin the one you've shown on your post

#!/usr/bin/perl @ini_array = getarr("1"); @final_array = (1); while (@ini_array) { @aux = (); push @final_array, @ini_array; map { push @aux, getarr($_) } @ini_array; @ini_array = @aux; } sub getarr { $fl = shift; @sublist=(); open(A,"$fl.txt") or die "Can't open $fl.txt"; while (<A>) { chomp; push @sublist, $_; } close A; return @sublist; } print "final: @final_array\n";
hope that helps...

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Replies are listed 'Best First'.
Re^2: store parent child relation
by Anonymous Monk on May 18, 2006 at 04:41 UTC
    turo,
    Thanks a lot for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://550181]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.