while(<>) { if(/^PORNUM:\s*(\S+)/m) { if(exists $skip{$1}) { # It matches, and ought to be skipped next; } } print; } #### my %skip = map { $_ => 1 } qw(PP22x43@.5 PC12x120/25); #### while(<>) { next if /^PORNUM:\s*(\S+)/m and exists $skip{$1}; print; } #### while() { if(/^PORNUM:\s*(\S+)/) { $skip{$1} = 1; } }
## my %skip = map { $_ => 1 } qw(PP22x43@.5 PC12x120/25); ##
## while(<>) { next if /^PORNUM:\s*(\S+)/m and exists $skip{$1}; print; } ##
## while() { if(/^PORNUM:\s*(\S+)/) { $skip{$1} = 1; } }