in reply to Re^2: Getting size of call stack
in thread Getting size of call stack

The entire purpose of the for(;;) loop is to handle preinitializations and temporary variables like your my $depth = 0 and to separate your test scalar( @frame ) from your NEXT() in $depth++.

Replies are listed 'Best First'.
Re^4: Getting size of call stack
by aufflick (Deacon) on Feb 02, 2005 at 04:24 UTC
    I guess I've never like shoe-horning code inside the c-like for operator.

    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...