[Omaha.pm] am I drunk.... code reduction? #2

Jay Hannah jhannah at omnihotels.com
Tue Aug 15 15:55:55 PDT 2006


?? I must be drunk? Doesn't 

   if ($r[0] =~ /^COMP/) {
      $r[0] = $r[1];
      if ((not $r[0] =~ /HCOMP/) and (not $r[0] =~ /GCOMP/) and (not
$r[0] =~ /CCOMP/)) {
         $r[0] = "COMP";
      }
   }

reduce to 

   if ($r[0] =~ /^COMP/) {
      $r[0] = "COMP";
   } 

??

j


More information about the Omaha-pm mailing list