Mike,
I would be surprised if this script works, giving that you are using strict
and you have referenced $COUNT before you have declared it:
my $OUT_TEMP="jobrpt.$COUNT";
(line 6). What value do you expect $COUNT to be when your script begins?
Phil Morley
|---------+----------------------------------------------->
| | "Mike Singleton" |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | veState.com |
| | |
| | |
| | 09/09/02 14:46 |
| | |
|---------+----------------------------------------------->
>------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: IO help
|
>------------------------------------------------------------------------------------------------|
This is the summary of the opening and closing of files for a script, I am
doing something wrong, as the output is nothing. I can only assume that I
have failed to write out at the appropriate time?
use strict;
use English;
use Getopt::Std;
use Cwd;
my $RPTFILE="jobrpt.tmp";
my $OUT_TEMP="jobrpt.$COUNT";
while (-f $OUT_TEMP) {
$COUNT += 1;
$OUT_TEMP="jobrpt.$COUNT";
}
open (OUTF,">$OUT_TEMP") || die "Cannot open output file $!";
my @files = glob('3*.log');
$grepexpr = "egrep
\"$JOBSTART\|$CONDSTART\|$JOBEND\|$CONDEND\|$JOBCANC\|$VOLUSED\"
@files>$OUT_TEMP";
system "$grepexpr";
#print OUTF $OUT_TEMP; # This line seems to make no difference....
close OUTF;
open (OUTF,"$OUT_TEMP") || die "Cannot open file for read, $!";
while (<OUTF>) {
... code blah blah blah
write;
};
}
exit 0;
===
Mike Singleton
Network Analyst
(253) 272-1916 x1259
(253) 405-1968 (cellular)
[EMAIL PROTECTED]
DaVita Inc.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs