in reply to grep of readline matching more lines than elements in array

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.

  • Comment on Re: grep of readline matching more lines than elements in array