Sleep is used to stop Perl interpreter executing the next statement for the specified time
In following example the next statement will be executed after 60 seconds.
Program Code:
# !/Perl/bin/perl
print("This is a demo of sleep function\n");
print("After this line program wil sleep for 1 minutes\n");
sleep(60);
print("Hey i am ready now");
Output:
After 60 seconds
0 comments:
Post a Comment