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>.
In reply to Re^2: partial matching of lines in perl
by bliako
in thread partial matching of lines in perl
by Sidd@786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |