PERL sleep Function:
Syntax:
Definition and Usage:
Pauses the script for EXPR seconds, or forever if EXPR is not specified. Returns the number of seconds actually slept. Can be interrupted by a signal handler, but you should avoid using sleep with alarm, since many systems use alarm for the sleep implementation.
Return Value:
- Integer, number of seconds actually slept
Example:
Try out following example: You will understand the functionality of sleep.
$num = 5;
while($num--) {
print sleep(1); print "\n";
} |
No comments:
Post a Comment