Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-12-01 07:49 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (795 votes), past polls