Re: [PATCH v4 4/6] send-email: create email parser subroutine
- From
- Samuel GROOT <samuel.groot@grenoble-inp.org>
- Date
- Jun 13, 2016, 22:18 UTC
- Message-ID
- <070d6313-8328-3086-b04f-0bf70e236264@grenoble-inp.org>
- In-Reply-To
- <20160609002150.GA28547@dcvr.yhbt.net>
On 06/09/2016 02:21 AM, Eric Wong wrote:
Show 5 quoted lines
> Samuel GROOT <samuel.groot@grenoble-inp.org> wrote: >> Email::Simple library uses qr/\x0a\x0d|\x0d\x0a|\x0a|\x0d/ [1]. >> Should we handle \n\r at end of line as well? > > "\n\r" can never happen with local $/ = "\n"
If the email file contains "\n\r", setting $/ = "\n" will leave "\r" at the beginning of each line.
We could trim them with:
s/^\r//; s/\r?\n$//;
But is it worth adding `s/^\r//;` to handle that extremely rare case?