in reply to Re: Conditional color formatting ---- HTML
in thread Conditional color formatting ---- HTML

Oops typo, was missing td after else.
# My requirement is to set a different background color # to rows depending on the "IF" conditions they satisfy. # Please help,what is the correct syntax while (my $line = <$IN>) { if ($line =~ /.*MATCH.*/) { $ret .= "<tr><td style='background-color:orange'>$line </td></tr>\ +n"; } else { $ret .= "<tr><td>$line </td></tr>\n"; } } close $IN; return $ret;