in reply to Re^6: Win32 Serial Under Windows 7
in thread Win32 Serial Under Windows 7
"'Not I,' said the sheep." I get impatient, so used 1s sleep, not 5s. But it works how I believe you intend for me using Strawberry v5.26.0.
use warnings; use strict; use Term::ReadKey; ReadMode 4; my $key; while( !defined ($key = ReadKey(-1)) ) { print qq(Test\n); sleep(1); } print qq(Exit With Key $key\n); __END__ From cmd.exe prompt: C:\usr\local\share\PassThru\perl\perlmonks>perl 1212444.pl Test Test Exit With Key a C:\usr\local\share\PassThru\perl\perlmonks>perl -v This is perl 5, version 26, subversion 0 (v5.26.0) built for MSWin32-x +64-multi-thread
relevant update: windows 10, 1709 (os build 16299.248)
irrelevant update: whoops, there was no sheep, just a pig, cat, and rat... and it's actually "and the cat said, 'not I'". I guess it's been a few years since my kids last requested that story.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 06, 2018 at 18:21 UTC | |
by pryrt (Abbot) on Apr 06, 2018 at 18:38 UTC | |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 18:45 UTC | |
by pryrt (Abbot) on Apr 06, 2018 at 19:15 UTC | |
by PilotinControl (Pilgrim) on Apr 06, 2018 at 19:35 UTC | |
|