in reply to Re^2: Getting size of call stackin thread Getting size of call stack
There's also no need to keep track of a seperate $depth since it's the same as scalar(@stack).
My version seems easier to read and more descriptive of what's actually happening. That's just a personal preference though...