in reply to Automatically running series of Perl programs
Well, this is probably easier done as a shell script, but since you asked:
use strict; use warnings; my %ops = ( 'foo' => ['param1','output1.txt'], 'bar' => ['output1.txt','output2.txt'], 'tins' => ['output2.txt','final_result.txt'], ); foreach (qw[foo bar tins]) { my $outfile = pop @{ $ops{$_} }; system( $^X, $_.'.pl', @{ $ops{$_} }, '>', $outfile); # $^X is per +l interp. }
|
|---|