wileykt has asked for the wisdom of the Perl Monks concerning the following question:
This works when run from the command line. I've looked at file permissions, and directory permissions, and paths, and everthing is correct. Help, Please! It's got me stumped.$logdir = "/whatdir/"; opendir(LOGDIR, $logdir) or die "Can't open $logdir: $!"; foreach $file (grep {-f && (-M > 5)} readdir(LOGDIR)) { unlink $logdir . $file; } closedir(LOGDIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Cron to Run Script
by scain (Curate) on Dec 28, 2001 at 21:19 UTC | |
|
Re: Using Cron to Run Script
by vek (Prior) on Dec 28, 2001 at 20:06 UTC | |
|
Re: Using Cron to Run Script
by count0 (Friar) on Dec 28, 2001 at 19:56 UTC | |
|
Re: Using Cron to Run Script
by sifukurt (Hermit) on Dec 28, 2001 at 19:59 UTC | |
by wileykt (Acolyte) on Dec 28, 2001 at 22:34 UTC | |
by tilly (Archbishop) on Jan 05, 2002 at 19:06 UTC |