By has no effect what do you mean?

I mean it doesn't change the outcome. The program behaves as if it wasn't there. It hangs.

Tested on Win2k SP2, AS perl 5.6.1

Well that's different. Various ActiveState builds on WinXP:
VersionBuildResult w/o EOFResult w/ EOF
5.6.0Active State build 623HangsProgram ends as desired
5.6.1Active State build 635HangsProgram ends as desired
5.8.0Active State build 806HangsHangs
5.8.8Active State build 817HangsHangs
5.10.0Active State build 1001HangsHangs

I suspect you'd get the same results on Win2k.

This is why:

>debug
-e100 "abc",0D,0A,1A,0D,0A,"def",0D,0A
-rcx
CX 0000
:0D
-ntest
-w
Writing 0000D bytes
-q

>c:\progs\perl560\bin\perl -ple1 test
abc

>c:\progs\perl561\bin\perl -ple1 test
abc

>c:\progs\perl580\bin\perl -ple1 test
abc
→
def

>c:\progs\perl588\bin\perl -ple1 test
abc
→
def

>c:\progs\perl5100\bin\perl -ple1 test
abc
→
def

More specifically, it's probably related to the introduction of PerlIO.

>c:\progs\perl560\bin\perl -V | find /i "perlio"
    useperlio=undef d_sfio=undef uselargefiles=undef

>c:\progs\perl561\bin\perl -V | find /i "perlio"
    useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef

>c:\progs\perl580\bin\perl -V | find /i "perlio"
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_
PERLIO -DPERL_MSVCRT_READFIX',

>c:\progs\perl588\bin\perl -V | find /i "perlio"
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_
CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
                        USE_PERLIO USE_SITECUSTOMIZE

>c:\progs\perl5100\bin\perl -V | find /i "perlio"
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IM
PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
                        USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE

Perl shouldn't have to treat \x1A specially (since it's only needed when reading from the console which is handled by the system) and it *must not* treat \x1A specially in some cases (such as when the encoding is UTF-16 or when the input can be "binary"), so I believe PerlIO is *correct* and there's actually a bug somewhere and this whole \x1A thing is a workaround that no longer works.


In reply to Re^4: ActiveState woes : Is it EOF-blind? by ikegami
in thread ActiveState woes : Is it EOF-blind? by rovf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.