gennari has asked for the wisdom of the Perl Monks concerning the following question:
I've got a script in cron that does <snippet>:
foreach $logFile (@primaryLogFileNames) { if (-e "$dupeDir/$logFile") { $error = system("$gzipLoc $dupeDir/$logFile"); if ($error) { $priZipDupeMessage .= "error zipping $dupeDir/$logFile\n"; } else { $priZipDupeMessage .= "zipped $dupeDir/$logFile\n"; } } elsif (-e "$dupeDir/$logFile\.gz") { $priZipDupeMessage .= "$dupeDir/$logFile already zipped\n"; } }
Simple enough. It runs just fine under 5.8.0. Under 5.8.3, however, we get this back from the cron:
Can't exec "no": No such file or directory at /export/home/oracle/scripts/arcLogCheck.pl line 407, <MORELOGS> line 4.
The <MORELOGS> stuff comes from:
open(MORELOGS, "$arcLogsUsToo"); while (<MORELOGS>) { $line = $_; chomp($line); if ($line =~ /^#/) { # do nothing } else { if ($line =~ /(\S+)\s(.+)/) { $logPath = $1; $logDate = $2; $priLogDate{$logPath} = $logDate; push(@primaryLogPaths, $logPath); push(@primaryLogFileNames, basename($logPath)); $dupeLogDate{$logPath} = $logDate; $logPathWzip = $logPath . ".gz"; $dupeLogDate{$logPathWzip} = $logDate; push(@dupeLogPaths,$logPath); } } }
Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 5.8.3 error not thrown by 5.8.0
by samtregar (Abbot) on Mar 25, 2004 at 18:35 UTC | |
by gennari (Novice) on Mar 25, 2004 at 19:27 UTC | |
|
Re: 5.8.3 error not thrown by 5.8.0
by tommycahir (Acolyte) on Mar 25, 2004 at 19:15 UTC | |
by gennari (Novice) on Mar 25, 2004 at 19:31 UTC | |
|
Re: 5.8.3 error not thrown by 5.8.0
by graff (Chancellor) on Mar 26, 2004 at 00:18 UTC | |
by gennari (Novice) on Apr 01, 2004 at 16:45 UTC |