in reply to Re: Two recursive functions returning in unexpected order
in thread Two recursive functions returning in unexpected order

Such problems in general are easy to resolve with extra printouts.

I usually like to use a subroutine for this and then call it at the beginning of every other subroutine in the script.

sub whoami { print "DEBUG: ".(caller(1))[3]."\n" if $DEBUG > 0; } sub dostuff { whoami(); <snip> }
-- Argel