in reply to Perl Script Calling Another Perl Script

Another option, that is probably more efficient, is to take the code from prog2, and move it into a module, that can then be used from many programs:

You would create Code.pm:
sub GenOutput { my @inputs = @_; my $output = "blah"; return $output; } 1;
Then, prog1 can do:
use Code; ... $gimme = &GenOutput($var1, $var2);
And prog2 is:
#!/usr/bin/perl use Code; &GenOutput;
Does that make sense?

-- zigdon