in reply to OT: Perl and Javascript - escaping newlines

how would I use perl to change any newlines (\n) to become line breaks (br) in html?
perl -e "$foo = qq|this\nwill\nlook\ndifferent|; $foo=~s/\n/<br>/g; p +rint $foo;" this<br>will<br>look<br>different c:\Temp>

Celebrate Intellectual Diversity