in reply to Re: Finding what called a subroutine
in thread Finding what called a subroutine

Very much recommend caller(), as educated_foo says; you can get a full stack trace all the way back to the main program if you need it.