in reply to Categorized Questions and Answers: tips and tricks

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