Mike Singleton wrote: > I think that I have bit off more than I can chew here.... > > Error: The process cannot access the file because it is being used by > another process. > > 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"; > close OUTF; >
when you are executing the 'system $grepexpr', the shell will create(because of you are redirecting) the $OUT_TEMP file for you. there is no need to open it again with your open (OUTF,'>$OUT_TEMP') statement. remove the open() and the close() statement and try again. also, the way you create your temp file is not reliable. there are better ways to do what you need. you might want to goto cpan and search for a module(i can never remember it's name!) that suits your need. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]