in reply to Re^9: Win32 Serial Under Windows 7
in thread Win32 Serial Under Windows 7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Win32 Serial Under Windows 7
by pryrt (Abbot) on Apr 06, 2018 at 19:15 UTC | |
The script I posted works on my Windows 10 with Strawberry 5.26.0 -- so ReadKey works on Windows 10. Which means there might be something different about your installation of Strawberry perl. Which is why I asked for the output of the long-form perl -V (that's a capital V), which gives many more details about the specifics of your installation. I am hoping it may show the subtle differences between your install and mine. Hence, I will ask again, but more explicitly this time: please include the full output of perl -V (capital V) inside <code> tags in your response. Also, please include the output from C:\>perl -MTerm::ReadKey -lE "say $Term::ReadKey::VERSION" (which for mine is 2.37_01). When I save the program I mentioned previously as "C:\usr\local\share\PassThru\perl\perlmonks\1212444.pl", then do Win+R (Windows > Run), and run cmd /k perl "C:\usr\local\share\PassThru\perl\perlmonks\1212444.pl", or when I run a cmd.exe window and run perl "C:\usr\local\share\PassThru\perl\perlmonks\1212444.pl", I get the results I showed. When you ran my script, how exactly did you run it? Did you have a cmd.exe window open already (or a powershell, or some other shell)? Or did you run it from Win+R? Are you going through a file association (running it as "1212444.pl", or double-clicking the file through Explorer), or do you explictly run it as "perl 1212444.pl"? I am looking for subtleties, so please don't skimp on details. | [reply] [d/l] [select] |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 19:35 UTC | |
Here is the output of term readkey: I copied and pasted your program into notepad....saved it as test.pl and ran it using the strawberry perl interpreter from the run start menu and I also right clicked it and ran it with the strawberry perl command interpreter | [reply] [d/l] [select] |
by pryrt (Abbot) on Apr 06, 2018 at 20:18 UTC | |
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.
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. | [reply] [d/l] |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 21:15 UTC | |