in reply to printing to new output files within a loop

Looks like you're opening a file named <pid>.out. This may work for you. ($$ is the current process id)
for (my $i = 0 ; $i < @array1 ; $i++) { open(OUT, ">$i.out") or die "can't open $i.out: $!\n"; print OUT ">" . $array1[$i] . ">" . $array2[$i] . "\n\n\n"; close OUT; }