user3781528 user3781528 - 9 months ago 26
Perl Question

Ignore rows that do not contain specific text

How can I ignore rows that do not contain the text

with Perl?

The following code skips rows that contain
and I would like to capture rows that contain

while ( <$in_fh> ) {

next if /^#/;
next if /\b(?:CNV)\b/;



How about changing the if to unless? :)

next unless /\b(?:CNV)\b/;