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, |
In reply to Re: 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 Athanasius
in thread 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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |