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

Reply via email to