B
Bill H
I am looking for an include for perl. I know about require, use etc
and use them, but I have a program that is getting large and would
like to put some of the code into their own files and just use a
include "filename" where the code I pulled belongs and have nothing
else done to that included code other than it being inserted when the
program is run. As an example:
main program:
line 1
line 2
include "other program"
line 3
line 4
other program
line 2a
line 2b
line 2c
when perl runs main program it sees it as
line 1
line 2
line 2a
line 2b
line 2c
line 3
line 4
I know you can do this with require but I have issues with variables
being set in one require not being available in another
Bill H
and use them, but I have a program that is getting large and would
like to put some of the code into their own files and just use a
include "filename" where the code I pulled belongs and have nothing
else done to that included code other than it being inserted when the
program is run. As an example:
main program:
line 1
line 2
include "other program"
line 3
line 4
other program
line 2a
line 2b
line 2c
when perl runs main program it sees it as
line 1
line 2
line 2a
line 2b
line 2c
line 3
line 4
I know you can do this with require but I have issues with variables
being set in one require not being available in another
Bill H