{
undef $/;
$slurp = <$fh>; # slurp up the file
# append a bogus final quote to the end of the file
$slurp .= '"';
# replace the end-of-record CR-LFs
$slurp =~ s/"\r\n"/"__EOR__"/g;
# replace the other CR-LFs with
tags
$slurp =~ s/\r\n/
/g;
# restore the end-of-record CR-LFs
$result =~ s/"__EOR__"/"\r\n"/g;
# remove the bogus final quote
$result =~ s/"$//;
}