- or download this
1) do $file is like eval `cat $file`, except the former
1.1: searches @INC and updates %INC.
1.2: bequeaths an *unrelated* lexical scope on the eval'ed code.
- or download this
# file foo.pl
print $var,"\n";
- or download this
# requiring code
$var = 'foo';
require 'foo.pl';
- or download this
# requiring code
my $var = 'foo';
require 'foo.pl';
- or download this
our $var;
for $var ( qw(foo bar quux) ) {
require 'foo.pl';
}