>>89
しょうがないな〜、JAPUたんが最近いないので、
変わりに教えてあげるYO!

print "合計金額",comma($total);

sub comma{
($_) = @_;
1 while s/(.*[0-9\?])([0-9\?]{3})/$1,$2/;
$_;
}

こんな感じかな。