my $DEBUG; BEGIN { $DEBUG = $ARGV[0]; if ($DEBUG) { require strict; import strict; } } # <-- The compiler is here because # Perl executes BEGIN blocks # as soon as it compiles them. # "strict" will work until the # end of this block (namely # until the end of the file). print($test); # strict error if $DEBUG