[Pdx-pm] Newbie question about data structures and stacks and recursion

Keith Lofstrom keithl at kl-ic.com
Wed Nov 30 13:11:38 PST 2005

I am not looking for a solution on the list, just a pointer to the
right documentation with examples.

I realize that if I copy references in an array or hash, I get a
reference to data, not a separate copy of the data.

I want to build a recursive subroutine for exploring a branching
decision tree, and I would like to glom together a bunch of scalars,
arrays, and hashes into a data structure of some kind and push them
onto a stack at the beginning of a routine, and pop them off after.
I can probably cobble up something cheesy, but I would prefer to
pull the right thing off CPAN or use the proper 5 line technique. 
The data are about 600 elements, the stack might go 10 deep, and I
won't be doing it very often, if that helps scale the problem. 


Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs

More information about the Pdx-pm-list mailing list