Hi Folks,
I used to read in one file (unknown size)at a time and process each line one by one, like this:
open( IN1, "<./infile1.txt" );
foreach $line (<IN1>) {
if ($line =~ /.../) {
...
}
}
Now I need to read in two files (with same no. of lines) simultaneously and process one line from infile1.txt and the corresponding line from infile2.txt together before moving to the next line of both files.
Would any perl guru tell me how to do this? Many thanks in advance!!!
Regards,
Gary
Gary Hung
ASIC Design Engineer
I used to read in one file (unknown size)at a time and process each line one by one, like this:
open( IN1, "<./infile1.txt" );
foreach $line (<IN1>) {
if ($line =~ /.../) {
...
}
}
Now I need to read in two files (with same no. of lines) simultaneously and process one line from infile1.txt and the corresponding line from infile2.txt together before moving to the next line of both files.
Would any perl guru tell me how to do this? Many thanks in advance!!!
Regards,
Gary
Gary Hung
ASIC Design Engineer