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

[Omaha.pm] grep hack. better? worse? (faster?)



Before

    my $sga = $o_ra->get_sga;
    if ($sga) {
      my $sga = join "|",@{$sga};
      $sga.="|";
      next if ($sga !~ /78/ and $o_sbc2->get_disp_line1 =~ /WEB SPECIAL/);
    }

After

    next if (
      $o_sbc2->get_disp_line1 =~ /WEB SPECIAL/
      and not grep { $_ eq "78" } @$o_ra->get_sga
    );


Not tested.

j