in reply to HTML embedded in perl

You either need to escape the " " around red, thus....
print STDOUT "<FONT COLOR=\"red\"> $data </FONT><P>";
or use a different quoting mechanism...
print STDOUT qq(<FONT COLOR="red"> $data </FONT><P>);
...but as an HTML purist, I would urge you to consider using styles rather than the font tag...
print STDOUT "<span style='color:red;'> $data <span>";
Good luck.