in reply to Problem displaying text with CGI

If you're definitely working with a CR/LF set, then $line =~ s/\xD\xA/<BR>/g; will replace it just fine.
~Cybercosis