Do you know where your variables are? | |
PerlMonks |
Re: Categorized Questions and Answers: tips and tricksby demerphq (Chancellor) |
on Jun 23, 2005 at 08:06 UTC ( [id://469313]=note: print w/replies, xml ) | Need Help?? |
Actually iirc you are better off using push/pop and $array[-1] instead of shift/unshift and $array[0] From what i remember (i should recheck the source) perls arrays are written with a slight bias towards adding things to the end over sticking them on the front. Also why stop at a stack? You can implement a queue with unshift/push, and a deque with unshift/shift and push/pop.
--- $world=~s/war/peace/g
In Section
Perl Monks Discussion
|
|