Inside test.pl, add this statement
my $listing = `perl test2.pl`; # NOTE: those are backticks
where $listing will be whatever test2.pl wrote to STDOUT and the exit code
of test2.pl is in $?. If test2.pl needs arguments, you can add them after
test2.pl.
Merrill
___
Use the system call if you don't want to capture
output:
system "test2.pl";
Use backticks if you want the output:
@results = `test2.pl`;
--- [EMAIL PROTECTED] wrote:
> Sorry for the newbie questionbut how do I
> include a perl program within
> another perl program?
>
> I have test.pl and I
Sorry for the newbie questionbut how do I include a perl program within
another perl program?
I have test.pl and I want to call within test.pl test2.pl.
Gregory J Toland
Sr. Systems Architect
CHM, Inc.
(301) 457-8058
[EMAIL PROTECTED]
___
Perl-Win