RE: how to interact with an endless loop

2005-10-07 Thread Su, Yu (Eugene)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > [EMAIL PROTECTED] > Sent: Friday, October 07, 2005 6:02 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: RE: how to interact with an endless loop > > Eugene,

Re: how to interact with an endless loop

2005-10-07 Thread pDale
On 10/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I had a loop that took hours to complete and it ran multiple iterationsover several days. I could have pressed Control-C or Control-Break but that would have killed it instantly with completing the currentiteration. What I wanted was to compl

RE: how to interact with an endless loop

2005-10-07 Thread Keith.Watson
> Hi All, > > I want to write a simple perl script to start an endless loop (for reading > data from a periphery device, such as a measurement unit), but I also want > to be able to stop it anytime. Right now I use "Ctrl-Alt-Del" to do it. > There must be a better way. I has been trying to use ope

RE: how to interact with an endless loop

2005-10-06 Thread John Serink
, October 07, 2005 3:08 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: RE: how to interact with an endless loop > > > Hi All, > > I want to write a simple perl script to start an endless loop > (for reading data from a periphery device, such as a > m

RE: how to interact with an endless loop

2005-10-06 Thread Chris Wagner
Use two threads. One sits on the console and waits for input. Meanwhile it spawns thread 2 which does all the work. When some input is received it can set a shared variable that thread 2 will notice and thus break out of the loop. At 01:47 PM 10/6/05 -0700, Su, Yu (Eugene) wrote: > will stop th

Re: how to interact with an endless loop

2005-10-06 Thread pDale
On 10/6/05, Martin, Greg (RTIS) <[EMAIL PROTECTED]> wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Su, Yu (Eugene) Sent: Thursday, October 06, 2005 3:08 PM I want to write a simple perl script to start an endless loop (for reading data from

RE: how to interact with an endless loop

2005-10-06 Thread Dirk Bremer
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Su, > Yu (Eugene) > Sent: Thursday, October 06, 2005 3:08 PM > To: perl-win32-users@listserv.ActiveState.com > Subject: RE: how to interact with an endless loop > >

Re: how to interact with an endless loop

2005-10-06 Thread pDale
On 10/6/05, Su, Yu (Eugene) <[EMAIL PROTECTED]> wrote: Hi All,I want to write a simple perl script to start an endless loop (for readingdata from a periphery device, such as a measurement unit), but I also wantto be able to stop it anytime. Right now I use "Ctrl-Alt-Del" to do it. There must be a b

RE: how to interact with an endless loop

2005-10-06 Thread Su, Yu (Eugene)
October 06, 2005 1:21 PM To: Su, Yu (Eugene); perl-win32-users@listserv.ActiveState.com Subject: RE: how to interact with an endless loop You could try reading from STDIN and either quit on a Ctrl-Z or some other character Ex: #this reads in what you type and prints it #entering ctrl-Z is seen

RE: how to interact with an endless loop

2005-10-06 Thread Martin, Greg (RTIS)
PROTECTED] On Behalf Of Su, Yu (Eugene) Sent: Thursday, October 06, 2005 3:08 PM To: perl-win32-users@listserv.ActiveState.com Subject: RE: how to interact with an endless loop Hi All, I want to write a simple perl script to start an endless loop (for reading data from a periphery device, such as a

RE: how to interact with an endless loop

2005-10-06 Thread Su, Yu (Eugene)
Hi All, I want to write a simple perl script to start an endless loop (for reading data from a periphery device, such as a measurement unit), but I also want to be able to stop it anytime. Right now I use "Ctrl-Alt-Del" to do it. There must be a better way. I has been trying to use open, pipe...no