I have an array of files which loops though them grabbing relevant data and creating a new file for each. These files are very big and Im curious if you can force perl to process more than one (or all) at the same time.
Code:
@Files = ("file1", "file2", "file3");
foreach $File (@Files) {
open(INFILE, $File) or die "Can't open source file: $File \n";
open(OUTFILE, "> $File.good") or die "Can't open '$File.good' file \n";
while (<INFILE>) {
@fields = split /\|/, $_;
if ( $fields[0] <= $FooBar ) {
print OUTFILE $_;
}
}
}
Thank you.