Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Pause Perl Script Execution

by oxone (Friar)
on Sep 08, 2007 at 15:25 UTC ( #637842=note: print w/ replies, xml ) Need Help??


in reply to Pause Perl Script Execution

Assuming the file in question will be created by something external to your Perl script and you just want to wait:

sleep 1 while !-e 'myfile.txt';
Note that !-e means "file doesn't exist". This will keep looping and checking every 1 second forever, and move on only if the relevant file appears.


Comment on Re: Pause Perl Script Execution
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2015-07-03 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (50 votes), past polls