How do I get stack traces in Perl?
There are many useful, core and CPAN based tools to generate a stack trace (as other answers illustrate.) However, if you want to roll your own, check out the
caller builtin. You can use this to walk down the stack and see exactly what's happening.