in reply to Help with my regex
You could also exclude lines that you don't want:
my $match = 'status|power'; foreach (@data) { next if /NCQ/ or /Supported/; print $_ if /$match/i; }
Or even simpler:
foreach (@data) { print unless /NCQ/ or /Supported/ or /^$/; }
|
---|
In Section
Seekers of Perl Wisdom