Perl - delay using eval?

Associate
Joined
18 Oct 2002
Posts
1,202
Location
Bristol
I'm trying to program a counter that will still allow keyboard input, say something that counts down 5 seconds but still allows you to perform some other function in the meantime. Any ideas?
 
How about using a while loop?
Not 100% sure that it would do what you want but may be worth a stab!

while(1)
{
wait for something to happen;
sleep 5000;
}

where the 5000 is the delay?
 
Back
Top Bottom