mcogan1966 has asked for the wisdom of the Perl Monks concerning the following question:
I have a Perl program (not a CGI script) that needs to call another program. This is not like the one calling many issue I had before. This is a simple one calling one once plan. The second program is going to genereate output that will go back to the first one. I can do this by piping, or I can make copies of this second program and put the relevant code in each Perl program that is going to use it, but both seem like the long way about doing this.
The basic concept is something like this:
In program one, there will be a line like:
It should be noted here that the call will also pass 2 parameters, in the form of variables, $var1 and $var2.$gimme = #some call to the second program;
and in program two:
I'm sure there has got to be a simple solution to this. I'm just not foo enough to have it down in my brain yet.#!usr/local/bin/perl $output = "blah"; #actually generated in the program return $output; #...or something I don't know if return # is the right statement here either.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Script Calling Another Perl Script
by jeffa (Bishop) on Nov 20, 2003 at 20:10 UTC | |
by mcogan1966 (Monk) on Nov 20, 2003 at 20:41 UTC | |
|
(z) Re: Perl Script Calling Another Perl Script
by zigdon (Deacon) on Nov 20, 2003 at 20:25 UTC | |
|
Re: Perl Script Calling Another Perl Script
by Roy Johnson (Monsignor) on Nov 20, 2003 at 20:38 UTC | |
by mcogan1966 (Monk) on Nov 20, 2003 at 20:43 UTC | |
|
Re: Perl Script Calling Another Perl Script
by shockme (Chaplain) on Nov 20, 2003 at 22:58 UTC | |
|
Re: Perl Script Calling Another Perl Script
by ysth (Canon) on Nov 21, 2003 at 00:12 UTC |