relevant. Basically, the argument to
is how many frames down on the stack to return. You'll need to start at 0 and increment the argument until you exceed the current stack depth, at which point
in scalar context. There's no simple way (that I know of) to just get the depth explicitly.