in reply to Useless use in void context.

Here:
$html = $html . qq(  &nbsp;|&nbsp; <font color="#ff0000">$t2</font> ), $i + 1;

What do you intend to do with the:, $i + 1 since you already have $t2 where you have this assigned to?

If you don't intend to do anything with it, remove the rest of the line from the comma or replace the comma with a '.' and the expression following it with $t2. You may also want to do something like:

$html .= qq( ... );