Rename re-used $t to $result

Perl scoping rules allowed this use of an inner "$t" even
though the outer target loop also uses "$t", but it sure is
disconcerting and there's no reason for it (other than that
I wasn't paying attention the first time around.)