in reply to Execution of parallel unix system commands

I'd go for xargs -P here. Except that it can't do input redirection. Perhaps your fastqc tool has an option for that?
# untested # launches 42 processes at a time open my $xargs, '|-', qw(xargs -0 -P 42 -n 2), qw($fastqc_folder/fastqc) or die $!; for my $file (@files) { print $xargs join("\000", "--outdir=$fastqc_output_folder", "$input_folder/$file"), "\000"; } close $xargs;