($pkg, $file, $line) = caller(1); [download]
In reply to Re: Finding what called a subroutine by educated_foo in thread Finding what called a subroutine by Anonymous Monk