# 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>$line </tr>\n"; } } close $IN; return $ret;
In reply to Re: Conditional color formatting ---- HTML
by Anonymous Monk
in thread Conditional color formatting ---- HTML
by newperlbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |