in reply to Re: partial matching of lines in perl
in thread partial matching of lines in perl

It seems it compares only the first line of FH with all lines from F2. You must either re-wind F2 each time the while(@a2 = <F2>){} exits using: seek F2, 0, SEEK_SET; . Or, read @a2 = <F2> outside both loops, just like @a1=<FH>.