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

Yeah, by "running perl on MSWin" I mean
$^O eq 'MSWin32'
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: AnyEvent::Socket -> Hosts File -> CR/LF Issue on windows?
by LanX (Saint) on Feb 08, 2022 at 11:26 UTC
    > $^O eq 'MSWin32'

    which is IMHO the central point when talking about newline problems in hybrid situations like WSL or Cygwin

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      WSL isn't an unix emulation layer for Windows like Cygwin; it's a VM that let's you run a real Linux install, with its own file system and all. It's 100% not Windows. In comparison, you have access to Windows system calls in Cygwin, and you still use the same file system.

        We recently had the case that someone complained that he ran the same script on the same directory, but the second time a VM accessed the Win-FS. (can't find it immediately)

        I should also have added git-bash as example, which comes with a bundled Perl.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery