http://www.perlmonks.org?node_id=281675


in reply to catching \n

You are probably looking for /g, substitute globally. Your example will only get the first \r and \n in $blah. Just use something like this which will also handle DOS style returns

$blah =~ s/\r?\n/<br>/g;