Hello WilliamDee, and welcome to the Monastery!
I’m not familiar with MIME::Parser, but it occurs to me that it might be easier to just accept the output as-is, and post-process to remove the unwanted CR characters.
For example, if you know that an extracted string has no carriage returns that you want to keep, post-processing is as simple as:
$string =~ s/\r//g;
If you need to be more precise, you can use a look-ahead assertion to remove only carriage returns that occur immediately before newlines:
$string =~ s/\r(?=\n)//g;
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to force MIME::Parser to extract text-files on a Windows system without the extra CR's on the end of lines?
by WilliamDee (Initiate) on Feb 11, 2014 at 04:01 UTC | |
by WilliamDee (Initiate) on Feb 12, 2014 at 03:45 UTC | |
by WilliamDee (Initiate) on Feb 12, 2014 at 19:28 UTC | |
|