Quote:
sub wait ()
for (i=0;i<1000000;$i++) {do nothing just cost time}
end sub
This whole topic must have been covered, like, 100 times, but briefly, what that would do is take your CPU usage up to close to 100% for a while. Not only would it freeze the client, it would also go close to freezing everything else (eg. your mail program, your web browser).
It is a rather brute-force way of making a delay, and may not even work as intended.
For instance, if you did this:
Send "say hi there"
call wait
Send "say I'm back after 5 seconds"
That probably wouldn't even work. Why? Because your CPU loop that the "wait" sub is in would also stop the operating system from doing TCP/IP, thus your original "say hi there" would probably be in the bowels of the operating system "hanging" until it got the CPU back from your script.
Then the two messages would still be sent in quick succession (when the 5 seconds, or whatever, were up).