file test1.pl: #!/usr/bin/perl -w use strict; require 'test2.pl'; print $x; file test2.pl: #!/usr/bin/perl -w use strict; my $x = "this is it\n"; 1; >./test1.pl Global symbol "$x" requires explicit package name at ./test1.pl line 4. Execution of ./test1.pl aborted due to compilation errors.