in reply to Massaging the Dictionary

If you want to insert the br-Tags, use this one:

$ perl -wle '$_="a\nbc\nd";s{$}{<br />}gm; print' a<br /> bc<br /> d<br />

This is your regex but without the additional \n.

If you want to replace the line endings, use s{\n}{<br />}gm