develooper Front page | perl.beginners | Postings from January 2002

Re: Calling a perl script with a perl script

Thread Previous
From:
Jon Molin
Date:
January 4, 2002 00:47
Subject:
Re: Calling a perl script with a perl script
Message ID:
3C356B54.18EB7DA8@resfeber.se
"Hubert Ian M. Tabug" wrote:
> 
> Hi,
> 
>         Given that I have a perl script main.pl, and I want main.pl to "use/call" the script >testprog.pl, and store testprog.pl's output into a variable that can be used within main.pl. >How do I go about doing it? Your help would be greatly appreciated.


it's not possible for you to import the code with use/require?
if not use
my $output = `perl testprog.pl`;

/Jon

> 
> Thanks,
> Hubert

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About