in reply to the #include business

If you are using Perl 5.6 or greater, than you can use our file test1.pl:
#!/usr/bin/perl -w use strict; #Imported from other file our $x; require 'test2.pl'; print $x;

file test2.pl:
#!/usr/bin/perl -w use strict; our $x = "this is it\n"; 1;

However, if you are using an older version then you can use use vars qw(...)