http://www.perlmonks.org?node_id=723143


in reply to Re^2: problem with 'bare LF' in script
in thread problem with 'bare LF' in script

$__to =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__cc =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__bcc =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__from =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__subject =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__html_message =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__text_message =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__importance =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__xpriority =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $__x_ms_priority =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg; $_mail_Message =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg;

I personally believe that if those substitutions are in fact all the same substitution, which seems to be the case -and would be most reasonable/probable- although I'm not sure due the alignment... then I should point out, on a totally OT basis wrt your actual problem, that you'd probably better do:

s{ \n\r | \r | \n }{\r\n}gx for $__to, $__cc, $__bcc, $__from, $__subject, $__html_message, $__text_message, $__importance, $__xpriority, $__x_ms_priority, $_mail_Message;

I also edited the regex to the point of:

--
If you can't understand the incipit, then please check the IPB Campaign.