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:Then, prog1 can do:sub GenOutput { my @inputs = @_; my $output = "blah"; return $output; } 1;
And prog2 is:use Code; ... $gimme = &GenOutput($var1, $var2);
Does that make sense?#!/usr/bin/perl use Code; &GenOutput;
-- zigdon
|
|---|