Dear all,
I am trying to write a script that reads in two or three consecutive lines
to process those. For example that if the first line of file_1 match with an
scalar from a file_2, then print the lines 2 and 3 of the file_1. I tried to
save everything in a array, but the file is extremely large and it kicks me
out.

So, I have tried to work line by line:

open (READER_1,"out2222") || die "\n I can't open the file READER_1 !!\n";
open (READER_2,"out.txt") || die "\n I can't open the file READER_2 !!\n";

@a1= <READER_2>;
close (READER_2);

@arr=();

for ($i=0; $i<=$#a1;$i=$i+1 ) {

$l= <READER_1>;

@temp1=split/[<>]/,$l[$i];
@temp2=split/[<>]/,$l[$i+1];
@temp3=split/[<>]/,$l[$i+2];
@temp4=split/[<>]/,$l[$i+3];

print " @temp1 is temp1\n";
}

BUT I DO NOT GET ANYTHING. I wonder if there is another way to work it out.

Many thanks,

L. Pardo

Reply via email to