Simply something like { my $variable_for_file = 'moose'; # Somehow stop printing. do file.inc; # Nothing should be printed. } #Now print calls should work again.