Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sleep - settle an argument?

by tobyink (Abbot)
on Sep 20, 2012 at 12:56 UTC ( #994653=note: print w/ replies, xml ) Need Help??


in reply to Sleep - settle an argument?

The implementation of sleep hasn't changed much over the years. It works almost exactly the same now as it did back in Perl 4.

Perl doesn't usually run in web browsers, though it runs on many web servers. sleep "works" in scripts serving up web pages, but it's not usually especially useful - it just makes the web server appear to run slower.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Sleep - settle an argument?
Select or Download Code
Re^2: Sleep - settle an argument?
by ultranerds (Pilgrim) on Sep 20, 2012 at 13:06 UTC
    Hi,

    Ah interesting. Maybe it was a case of me being naive when I was learning perl and writing my first scripts :) I always thought that the sleep command was only to be used in SSH (as it had no effect in the web-browser). Thanks for clarifying - although that now means I've lost a bet :D

    I have to admit - I've never had a reason to use sleep to "slow down" a script running in a web-browser - its only really when doing scripts that would need to leave a little gap to help the server cope with larger processes via cron etc

    Cheers

    Andy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994653]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-09-18 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (115 votes), past polls