Yes. The proper way to do this is using the Carp module. However, you can examine the code stack via the caller() function. Implement your own full-blown stack tracer, or simply use code such as this to get a quick clue:
my ($pkg, $file, $line, $sub) = caller(0); print "$sub was called from $pkg in $file line $line\n";
The output will look something like this:
main::subroutine called from main in ./callertest line 8