in reply to AnyEvent::Socket -> Hosts File -> CR/LF Issue on windows?

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

Replies are listed 'Best First'.
Re^2: AnyEvent::Socket -> Hosts File -> CR/LF Issue on windows?
by sectokia (Friar) on Feb 09, 2022 at 10:18 UTC
    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.