--- "Bradley M. Handy" <[EMAIL PROTECTED]>
wrote:
> 
> 
> > -----Original Message-----
> > From: Thomas Jakub [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 11, 2001 11:43 AM
> > To: [EMAIL PROTECTED]
> > Subject: breakable loop???
> >
> >
> > I have the following code segment:
> >
> > for ($count=1;$count<11;$count++)
> > {
> > $c=getc;
> 
> Your script is pausing here for input from STDIN. 
> I'm not really sure how
> to solve your problem though.
> You would need some kind of event handler, and
> haven't tried doing those in
> PERL yet.

Is there a way I can read the what key is pressed
without pausing the program?  That's some of the
problem...  Also, how would I make an even handler in
perl?

> > $count=1;
> > print "blah\n";
> > if (ord($c) eq 10)
> > {
> > print "Stopping..."
> > $count = 12;
> > }
> > }
> >
> > I'm trying to get it so it prints a bunch of
> "blah's"
> > until I hit the enter key, at which point it will
> say
> > that it is stopping.  However, when I run this
> piece
> > of code, it says only one blah, and even then, it
> is
> > after I hit enter...  So, what am I doing wrong?
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to