Sleep doesn't help. He needs the Camel book and to look up alarm and the
%SIG hash, there is a good example of a timer there. He wants to wait
for input, but only for a certain amount of time. Sleep would wait, but
not allow the program to respond to input.
Eric
Shawn Milochik wrote:
>
> On Thu, 21 Aug 2003 20:49:41 -0400, fnord wrote:
>
> > I've been teaching myself perl today by writing a simple word game. It's
> > going quite well, except I've hit a wall on the timer.
> >
> > At the moment it's a simple CLI interface, and what I need to do is
> > present the player with a list of letters, and give them 3 minutes to
> > enter as many words as they can from the list of letters.
> >
> > I'm thinking that the easiest way to do this would be to wrap the game
> > logic in a while() loop for the 3 minutes.
> >
> > I can't, however, find any examples of how to do this on the web or in
> > the newsgroups.
> >
> > Can someone give me a hand?
> >
> >
> > thanks,
> > fnord
>
> Check out the sleep command.
>
> Shawn
|