$ cat foo.pl package foo; use strict; use warnings; my $x; tu_was(); sub tu_was { my $y = $x + 23; } 1; $ perl -wle' eval { require "foo.pl" }; print "error: <$@>"' Use of uninitialized value $x in addition (+) at foo.pl line 9. error: <>