Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Newbie here- but nevertheless, I've got to get something done.
I'm trying to get the sleep function working for a scan script that I'm writing to check a directory for new files every n seconds. My simple test case is this:
#!/usr/bin/perl -w use strict; { print "I'm going to sleep"; sleep(1); redo; }
When executed it never wakes up!Can anyone help me out and explain what I'm doing wrong with this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sleep?
by merlyn (Sage) on Mar 20, 2001 at 21:20 UTC | |
|
(Zigster)Re: sleep?
by zigster (Hermit) on Mar 20, 2001 at 21:24 UTC | |
by sierrathedog04 (Hermit) on Mar 21, 2001 at 00:17 UTC | |
by extremely (Priest) on Mar 21, 2001 at 02:55 UTC | |
|
Re: sleep?
by myocom (Deacon) on Mar 20, 2001 at 21:36 UTC | |
by Guildenstern (Deacon) on Mar 20, 2001 at 21:48 UTC | |
by Adam (Vicar) on Mar 21, 2001 at 00:39 UTC | |
by Guildenstern (Deacon) on Mar 21, 2001 at 01:53 UTC |