You said you were using perl 5.26, but you showed 5.16.3; I tried on my 5.16.3 64-bit installation (your as shown is 32bit), but the Term::ReadKey worked there, too. Your Term::ReadKey version is 2.37, whereas mine is 2.37_01. Maybe Strawberry patched it (Term::ReadKey is in the "vendor/lib/Term/ReadKey.pm" of my Strawberry 5.26.0 64bit installation; when I look on cpan, Term::ReadKey lists 2.37, so that's why I assumed it was a strawberry patch), so you might want to verify that you've really got the strawberry installation you think you have (since you claimed 5.26, but showed 5.16.3).

I tried again, showing my whole sequence, trying with my default 5.26.0_64, the older 5.16.3_64, and just now also tried a 32bit version (5.26.1_32). All three worked for me. Two of the three were using Term::ReadKey version 2.37_01.

Mine: C:\usr\local\share\PassThru\perl\perlmonks>perl -lE "use Term::ReadKey +; say $Term::ReadKey::VERSION; say $INC{'Term/ReadKey.pm'}" 2.37_01 C:/usr/local/apps/berrybrew/perls/5.26.0_64_PDL/perl/vendor/lib/Term/R +eadKey.pm C:\usr\local\share\PassThru\perl\perlmonks>perl 1212444.pl Test Test Exit With Key q C:\usr\local\share\PassThru\perl\perlmonks>berrybrew use 5.16.3_64 perl-5.16.3_64 ============== Microsoft Windows [Version 10.0.16299.248] (c) 2017 Microsoft Corporation. All rights reserved. <berrybrew use 5.16.3_64>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>perl -lE "use Term::ReadKey +; say $Term::ReadKey::VERSION; say $INC{'Term/ReadKey.pm'}" 2.30.02 C:/usr/local/apps/berrybrew/perls/5.16.3_64/perl/vendor/lib/Term/ReadK +ey.pm <berrybrew use 5.16.3_64>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>perl 1212444.pl Test Test Exit With Key q <berrybrew use 5.16.3_64>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>exit Exiting <berrybrew use 5.16.3_64> C:\usr\local\share\PassThru\perl\perlmonks>berrybrew use 5.26.1_32 perl-5.26.1_32 ============== Microsoft Windows [Version 10.0.16299.248] (c) 2017 Microsoft Corporation. All rights reserved. <berrybrew use 5.26.1_32>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>perl -lE "use Term::ReadKey +; say $Term::ReadKey::VERSION; say $INC{'Term/ReadKey.pm'}" 2.37_01 C:/usr/local/apps/berrybrew/perls/5.26.1_32/perl/vendor/lib/Term/ReadK +ey.pm <berrybrew use 5.26.1_32>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>perl 1212444.pl Test Test Exit With Key x <berrybrew use 5.26.1_32>: run "exit" leave this environment C:\usr\local\share\PassThru\perl\perlmonks>exit Exiting <berrybrew use 5.26.1_32>

Right now, I'm leaning towards guessing there may have been a bug or Strawberry incompatibility in Term::ReadKey 2.37, which Strawberry patched in 2.37_01, but that you aren't using that because you're actually using an older Strawberry than you thought.


In reply to Re^13: Win32 Serial Under Windows 7 by pryrt
in thread Win32 Serial Under Windows 7 by PilotinControl

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.