sub script1 { # contents of script file 1 inserted here my $x; # this is problematic in mod_perl... sub foo { # ... } foo(); } sub script2 { # contents of script file 2 inserted here sub foo { # ... } foo(); }