I can only guess that the grep is matching more than one line for some of the elements in @isos20
Even assuming it did, you would still only print $line only once, since the grep is used only as a conditional for deciding whether to print or not. Your error, if any, must be somewhere else. But I can't say where, not having seen your input.
In reply to Re: grep of readline matching more lines than elements in array
by Laurent_R
in thread grep of readline matching more lines than elements in array
by bdorsey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |