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

what's your perl -V?

Replies are listed 'Best First'.
Re^10: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 06, 2018 at 18:45 UTC
    5.16 as i tried to keep the same versions and modules the same perl on windows 7, vista and xp....the script works fine on those machines.....just not windows 10

      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.

        Here is the perl -V output:
        Microsoft Windows [Version 10.0.16299.309] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Scott>perl -V Summary of my perl5 (revision 5 version 16 subversion 3) configuration +: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='Win32 strawberry-perl 5.16.3.1 #1 Tue Mar 12 13:55:20 2013 +i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPER +L_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitf +ields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.6.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long lo +ng', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\straw +berry\c\lib"' libpth=C:\strawberry\c\lib C:\strawberry\c\i686-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl516.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE +" -L"C:\strawberry\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB +_ALLOC USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Mar 12 2013 14:01:07 @INC: C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib . C:\Users\Scott>
        Here is the output of term readkey:
        2.37
        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