Is there an alternative for sleep in Perl so my IRC-bot can still use functions

WickeTD

New member
while asleep? I'm trying to make it able to still respond while it's waiting, it's logical that with sleep it halts the whole bot, but how do I make it so that the bot still responds while waiting?
Thanks.
 
The short answer is "no". If you need to "respond", why are you sleeping in the first place?
The programming construct it sounds like you need is called an "event loop". Read up on that.
 
Back
Top