use strict; use warnings; my $include_file = 'include.pl'; my $wibble; eval do { open(my $fh, '<', $include_file) or die("Unable to open include \"$include_file\": $!\n"); local $/; <$fh> }; die $@ if $@; print $wibble; #### # include.pl $wibble = 'fred'; # Uncommenting the following line causes a strict error. #$wobble = 'joe';