<p>The following Perl statements behave identically on Unixish machines.  Do they behave differently on Windows?  If yes, is it because of the magic \n?</p>

<pre><code>  split m/\015\012/ms, $http_msg;
  split m/\015\012/s, $http_msg;
</code></pre>

<p>I got a <a href="http://www.nntp.perl.org/group/perl.cpan.testers/2008/10/msg2450019.html" rel="nofollow noreferrer">failure</a> on one of my CPAN modules from a Win32 smoke tester.  It looks like it's an \r\n vs \n issue.  One change I made recently was to add //m to my regexes.</p>

For these regexes:
```
```
m/\015\012/ms
m/\015\012/s
```
```
Both /m and /s are meaningless.
/s: makes
```
.
```
match
```
\n
```
too.
Your regex doesn't contain
```
.
```
/m: makes
```
^
```
and
```
$
```
match next to embedded
```
\n
```
in the string.
Your regex contains no
```
^
```
nor
```
$
```
, or their synonyms.
What is possible is indeed if your input handle (socket?) works in text mode, the
```
\r
```
(
```
\015
```
) characters will have been deleted on Windows.
So, what to do? I suggest making the
```
\015
```
characters optional, and split against
```
```
/\015?\012/
```
```
No need for /m, /s or even the leading
```
m//
```
. Those are just cargo cult.