[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



?? 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