If your second file is not too big (compared to memory available) I would suggest to read the second file into a hash before the first loop and then loop through file1 and look for matches. You only need one loop then and not the two nested ones.
cheers
si_lence
In reply to Re: nested loops to compare 2 files is only looping a limited number of times.
by si_lence
in thread nested loops to compare 2 files is only looping a limited number of times.
by stevemayes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |