You can put the last two lines anywhere to get a stack trace to that point. So if you had a weird warning (the reason for my previous attempt) you could set $SIG{__WARN__} to that two line sub-routine.use Carp; # Fatal stack trace made non-fatal. eval q{confess('Stack Trace')}; print $@; # $@ is set by eval().
That may seem trivial, but it took me awhile to have that light-bulb come on... so I thought I would post it.
In reply to Stack Trace by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |