Hi.
I'd like a perl loop that prints out numbers (1, 2, 3, 4...) until the "s" key is pressed. Then it should stop until "s" is pressed again. Then it should start counting where it left off. I think this would be a while loop, but I don't know how to test for a keystroke in the middle of a loop. Can anyone please let me know how to test for a keystroke while counting?
Thanks.
Steve.
Exit a Perl Loop with a Keystroke?
Try this procedure:
http://mirrors.dotsrc.org/cpan/scripts/i...
Reply:Try the Term::ReadKey module.
Reply:Can you use a "do until" loop?
http://perl.about.com/od/perltutorials/a...
More info in this thread-
http://www.thescripts.com/forum/thread49...
Joyce
http://www.DesignByJoyce.com/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment