in reply to regex to replace linefeeds with <p> tags

The Template toolkit filter html_para may also help you. It wraps <p> tags arround paragraphs (delimted by a blank line).

Merlyn will tell you how to use Tempate in This article, one of his spiffy Linux Magazine Columns.

@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;