in reply to #include files
One of the perl command line flags is "-P" which instructs perl to run the C preprocessor upon the source of the script.
So "test.pl":
print "Before\n"; #include "test2.pl" print "After\n";
And test2.pl:
print "During\n";
Will do the right thing if you run "perl -P test.pl" - producing:
Before During After
However I suspect this isn'te really what you want to do - and the replies mentioning modules are the real solution to your problem.
(OT: Using ActivePerl 'perl -P' crashes immediately under Windows, and has as long as I can remember. Weird.)
|
|---|