in reply to Re: Re: formatting newline characters
in thread formatting newline characters

Try using the s flag on your regular expression, to match multiple lines. The regex you are now using will not match newlines - it stops at the first one.
$input =~ s/\n/\r\n/gs;
Also, you might try some sanity checks:
print "contains CR's!\n" if $input=~/\r/s; print "contains NL's!\n" if $input=~/\n/s; ...
Good luck!