> -----Original Message-----
> From: Mike Singleton [mailto:[EMAIL PROTECTED]]
> Sent: 11 September 2002 04:40
> To: [EMAIL PROTECTED]
> Subject: new output error
>
>
> The output file (myfile.csv) is blank... any ideas out there? Thanks!
>
> print OUT join (',', @f) . "\n" if
> /$JOBSTART|$CONDSTART|$JOBEND|$CONDEND|$JOBCANC|$XFER|$VOLUSED/i;
>
if the output file is empty, then this would appear to never be true?
if ( /$JOBSTART|$CONDSTART|$JOBEND|$CONDEND|$JOBCANC|$XFER|$VOLUSED/i )
{
print OUT join (',', @f) . "\n";
} else {
print "skipped: '$_'";
}
I would recommend that you pause, and do some research into defensive
programming, and think a little about how you can improve your debugging
skills. Your programming will improve dramatically and quickly, if you
learn to 'run the script' in your own mind. 8-)
Other things to ponder [these may be artefacts of the abbreviated code]
Consider a better delimiter than COMMA as a general rule TAB is much
better as it is much rarer to find TABs in the middle of numbers etc.
Also, you can open a TAB delimited file in Excel and it will be
automatically parsed into columns etc [useful for checking your
results].
Why are the constant values in variables? [maybe are they used in lots
of places in different pieces of code? maybe the values change in the
future?]
Regards
Jeff
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]