in reply to How do I add a delay in my perl program?

Kudos to andyford for his comments. Yes, as was said sleep, or the Time::HiRes version of it will sleep for $n seconds. It may also be a bad idea. If you're program is waiting for a process it kicks of to finish, it may be better to have the process send a signal to your program.

Why do you want your program to wait a few seconds? Tell us that and you'll probably get a much better answer than 'use sleep.'

emc

At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

—Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
  • Comment on Re: How do I add a delay in my perl program?