# master my @files = qw[ path/to/file0 path/to/file1 path/to/file2 ]; system 'perl', 'slave.pl', @files; #### # slave print "List of files to process:\n"; print " $_\n" for (@ARGV); #### # master my @files = qw[ path/to/file0 path/to/file1 path/to/file2 ]; open my $fh, '>', 'filelist'; print $fh, "$_\n" for (@files); close $fh; system 'perl', 'slave.pl' #### # slave open my $fh, '<', 'filelist'; print "List of files to process:\n"; print while <$fh>; close $fh;