Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: I need help with some recursion

by tobyink (Abbot)
on Dec 08, 2012 at 14:23 UTC ( #1007895=note: print w/ replies, xml ) Need Help??


in reply to Re^2: I need help with some recursion
in thread I need help with some recursion

So don't apply it to all the lines. This seems to produce something close to your desired output:

my %seen; for (my $i = 1; $i < @lines; $i++) { next if $seen{$i}; my @results = line_closure($i); print Dumper \@results; $seen{$_}++ for @results; }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^3: I need help with some recursion
Download Code
Re^4: I need help with some recursion
by ragnarokPP (Initiate) on Dec 08, 2012 at 14:59 UTC

    it seems work perfect. thank you very much.

Re^4: I need help with some recursion
by ragnarokPP (Initiate) on Dec 08, 2012 at 15:10 UTC

    thank you very much

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-09-02 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls