my %count;
{
local *FH;
-f $file or die "No such file.\n";
open FH, '<' . $file or die $!;
while (<FH>) { ++$count{$_} for 「 (.*?) 」/g }
close FH;
}
print
header(-charset => $charset),
start_html(-encoding => $charset, -lang => 'ja'),
table(Tr([ map td([ $_, $count{$_} ]), sort keys %count]) ),
end_html,

文中の単語の数を数えるスクリプトなんですが、
「x回以上出た場合はbgcolorをredにする」という風にしたくて、
if(5<$count{$_}){$bg="orange";}を追加して、
tr部分に{-bgcolor=>$bg}を追加したんですが、上手く変わってくれません。

どなたかご教授お願い致します。