Is perl meant to treat '\n' in regex as '\r\n' when running on windows?
I think the answer depends upon whether perl has been built for native windows (eg Strawberry Perl or ActivePerl) or whether perl has been built for (eg) Cygwin or MSYS.
What's your perl -V ?
Sounds like your problem would be fixed by running dos2unix on the hosts file.
(Running unix2dos on the same file will then revert it to its original form.)
Cheers, Rob
Comment on Re: AnyEvent::Socket -> Hosts File -> CR/LF Issue on windows?
I encountered the issue running standard strawberry perl 64bit.
Modifying hosts file wasn't really an option for me because the idea was the program is being pp'd into an exe and run by various users on their own systems.