It sounds like you are describing egrep, if you have that available to you on your OS:
$ egrep -v -f file1 file2 > file3
Update: Since you have not given us enough to reproduce your problem, I recommend that you start sprinkling your code with more print's. Refer to Basic debugging checklist for more details.
In reply to Re: list lines not found in config (while+if)
by toolic
in thread list lines not found in config (while+if)
by tangledupinperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |