in reply to substitute an enter with regular expressions

If your input string is like so: "one\ntwo\nthree" then all you need is s/\n/<BR>/g;
if you're reading it in a line at a time, you can chomp and join. (Or not chomp and sub and join)