in reply to Simple stack implementation
But if you are trying to make a stack for actuall use in Perl, just use an array. Then you get push and pop free!, plus arrays are like double ended queues, so you get shift and unshift.
See Shift, Pop, Unshift and Push with Impunity! for some good insight into this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple stack implementation
by Dominus (Parson) on Nov 18, 2000 at 01:10 UTC | |
by Adam (Vicar) on Nov 18, 2000 at 01:48 UTC | |
by Dominus (Parson) on Nov 18, 2000 at 19:37 UTC |