in reply to Processing Chat Logs

this calls for a regex or two. Something like this should do nicely:
open LOG, "<$logfile" or die "Blerch: $!\n"; while (<LOG>) { if (/string-in-the-middle/) {print "<FONT>$_</FONT>";} if (/^string-at-the-beginning/) {print "<SOME_OTHER_FONT>$_</SOME_OT +HER_FONT>";} }

If you want the non-matching lines as well, you'll have to dress this up a bit more.

CU
Robartes-