$ perl -w -MData::Dumper -E' $SIG{__WARN__} = sub { print Dumper \@_, [ caller(0) ] }; # create and install the handler my $undef; # obviousely undefined say "$undef undef"; # warning occurs here ' $VAR1 = [ 'Use of uninitialized value $undef in concatenation (.) or string at -e line 4. ' ]; $VAR2 = [ 'main', '-e', 1, 'main::__ANON__', 1, '', undef, undef, 133376, 'UUUUUUUUUUUUU', { 'feature_unicode' => 1, 'feature_say' => 1, 'feature_state' => 1, 'feature_switch' => 1 } ]; undef