Re: timer without modules by McDarren (Abbot) on Nov 09, 2009 at 00:57 UTC |
How about the built-in sleep function?
If that isn't suitable, then you'll probably need to provide a little more detail about what you are wanting to do.
Cheers,
Darren | [reply] |
|
what im trying to do is create a weather script for an irc bot i made with IO::socket, but before i use the weather script on it i need to ensure users cannot flood the bot or channel using the publicly msg'd command.
| [reply] |
Re: timer without modules by biohisham (Priest) on Nov 09, 2009 at 01:02 UTC |
what do you mean by "delay use"? Do you probably mean sleep? this function can cause the script to pause for the amount of seconds specified or forever if no seconds were specified. Consider this very simple example:
for($num=5;$num>0;$num--){
print "$num\n";
sleep 2;
}
It'd take a while after printing the current value of $num and looping once again as affected by the duration of time provided in the EXPR to sleep. Best of luck...
Excellence is an Endeavor of Persistence.
Chance Favors a Prepared Mind.
| [reply] [d/l] |
Re: timer without modules by Anonymous Monk on Nov 09, 2009 at 01:27 UTC |
| [reply] |
|
right, but i do not have root access on the box in question, which makes it sort of a pain with certain modules...
unless you can point me in the right direction to do it without root **as i said im pretty new to this**
much thanks guys.
| [reply] |
|
| [reply] |
|
|
|
|
|
|
Re: timer without modules by doug (Pilgrim) on Nov 09, 2009 at 17:41 UTC |
| [reply] |
|
| [reply] |