[Omaha.pm] and not and not and not and not...

Andy Lester andy at petdance.com
Thu Sep 28 11:19:23 PDT 2006


On Sep 28, 2006, at 1:05 PM, Jay Hannah wrote:

> if ((not $row[0]  =~ /RMCHG/) and (not $row[0]  =~ /RMCHRG/)
>    and (not $row[0]  =~ /REUN/)) {
>
> Solution:
>
> if ($row[0] !~ /^(RMCHG|RMCHRG|REUN|VRMCH)$/) {

Or:

my @skips = qw( RMCHG RMCHRG REUN VMRCH );
my %skips = map {($_,1)} @skips;

if ( not exists $skips{$row[0] ) {...


--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance






More information about the Omaha-pm mailing list