You might want to have a look at the HTML::FromText module at CPAN. http://search.cpan.org/~cwest/HTML-FromText-2.05/lib/HTML/FromText.pm I would probably pop the first line an treat it separatly, and then filter the rest through HTML::FromText, possibly with som subclassing. -- Kenneth Ekdahl (sensei@sensei.nu), (sensei@cpan.org) http://sensei.nu http://merit.sensei.nu