in reply to Massaging the Dictionary
$ perl -wle '$_="a\nbc\nd";s{$}{<br />}gm; print' a<br /> bc<br /> d<br /> [download]
This is your regex but without the additional \n.
If you want to replace the line endings, use s{\n}{<br />}gm
Perl 6 in German