Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
azheid,
It sounds like your tab delimited file is a text representation of a tree. I believe you have implied but not explicitly stated that if A is related to B and B is related to C that A is related to C. If that's the case, and your file looks like the following:
You need to first identify which of the two columns (1 or 2) represents the parent in the relationship. Next, you need to identify the root(s), and build the tree in memory (assuming the file will fit in memory). Once you have done that, you just need to find the node you want to deactivate and walk the tree below that point deactivating all attached nodes. Cheers - L~R In reply to Re: Perl Recursion
by Limbic~Region
|
|