in reply to Pattern matching || grep -v which logic is better?
use strict; use warnings; my @lines = <DATA>; my @greped = grep {! /remove/} @lines; print foreach @greped; __DATA__ 1 String not in this line 2 remove is here 3 but not here [download]