in reply to Re^12: Win32 Serial Under Windows 7
in thread Win32 Serial Under Windows 7

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.

Replies are listed 'Best First'.
Re^14: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 06, 2018 at 21:15 UTC
    Good News! You forced me to un-install all versions of perl on Windows 10...installed strawberry perl 5.26.1 32 bit...installed updated Term::ReadKey and Win32::SerialPort....and my original script works! Thanks for the help and guidance!