Re: Recursive subrutines

2001-06-21 Thread Aaron Craig
At 10:54 20.06.2001 +0200, Dalløkken, Espen wrote: >I'm trying to wirte a recursive subroutine that recives an array, does some >processing and then calls itself with a new array. >The problem is that I never get to retrive the array after the subroutine >has ran once. When it runs the second time

Re: Recursive subrutines

2001-06-20 Thread Me
> [recursive procedure not localizing array passed as parameter] > --- > &buildBranch(@someNodes); > > sub buildBranch() > { > @numNodes = @_; Use my @numNodes. my declares a new private variable each time it is encountered. Without it, @numNodes is the same variable each time the procedure g

Recursive subrutines

2001-06-20 Thread "Dalløkken, Espen"
I'm trying to wirte a recursive subroutine that recives an array, does some processing and then calls itself with a new array. The problem is that I never get to retrive the array after the subroutine has ran once. When it runs the second time it doesn't get the correct set of items in the passed