Много уважаемый Алл!!! подскажите функцию перла, которая делала задержку выполнения скрипта!
Т.е. мне нужно чтоб цикл выполнялся с определенным периодом.
while (<>) {
.....
задержка 3 секунды
.....}
Заранее огромное спасибо!
while (<>) {
.....
sleep(3)}
Подробнее смотрите man perlfunc:
sleep EXPR
sleep Causes the script to sleep for EXPR seconds, or forever if no EXPR. May be interrupted if the process receives a signal such as `SIGALRM'. Returns the number of seconds actually slept. You probably cannot mix `alarm' and `sleep' calls, because `sleep' is often implemented using `alarm'.On some older systems, it may sleep up to a full second less than what you requested, depending on how it counts seconds. Most modern systems always sleep the full amount. They may appear to sleep longer than that, however, because your process might not be scheduled right away in a busy multitasking system.
For delays of finer granularity than one second, you may use Perl's
`syscall' interface to access setitimer(2) if your system supports it, or else see the select entry elsewhere in this document above. The
Time::HiRes module from CPAN may also help.See also the POSIX module's `sigpause' function.
WWell,