How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict;
isn't sufficient for this purpose.
use warnings FATAL => 'uninitialized';
use Carp ();
$SIG{__DIE__} = \&Carp::confess;
The first line makes the warning fatal. The next two cause a stack trace when your program dies.
See also man 3pm warnings
for more details.