in reply to replacement of newlines

If you assume that a line can only end with a period (.) or a double-quote ("), then the following seems to give the desired output:
#!/usr/bin/perl -w use strict; undef $/; my $text = <DATA>; $text =~ s/([^."])\n/$1 /g; print "$text"; __DATA__ this is a wrapped line. "This is a wrapped quote." this first line is fine. so is this one.
Prints:
this is a wrapped line. "This is a wrapped quote." this first line is fine. so is this one.
Cheers,
Darren :)