Hi All
I have this bit of code in a program I'm working on.
while (RAWREPORT) {
next if /\f/ ;
next if /^DATE : / ;
next if /^\s{15,}PART / ;
next if /^COUNTER QTY/ ;
next if /^\s+$/ ;
print ; #
Hello,
I believe this will do what you want:
next if grep { $rawreport_item =~ /$_/ } @possibleMatches;
Just make sure the regexes in @possibleMatches are not user supplied or
they may try sneaky bad things :)
perl -mstrict -we 'my @m = (q(^\d+$), q(^\w+$)); for my $item (qw(123
abc 1-2we)){
B McKee wrote:
Hi All
Hello,
I have this bit of code in a program I'm working on.
while (RAWREPORT) {
next if /\f/ ;
next if /^DATE : / ;
next if /^\s{15,}PART / ;
next if /^COUNTER QTY/ ;
next if /^\s+$/ ;