[Perl-unix-users] error on close

2001-10-16 Thread Erick Nelson
I have some common code that many programs call that writes messages to a log file. It looks something like... if (open(LOG, ">>$logfile")) { print LOG $message; close(LOG) || warn "unable to close log file $logfile"; } else { warn "unable to open $logfile for appending"; } The problem

Re: [Perl-unix-users] error on close

2001-10-16 Thread $Bill Luebkert
Erick Nelson wrote: > > I have some common code that many programs call that writes messages to > a log file. It looks something like... > > if (open(LOG, ">>$logfile")) { >print LOG $message; >close(LOG) || warn "unable to close log file $logfile"; > } > else { >warn "unable to ope

[Perl-unix-users] error on close

2001-10-16 Thread Erick Nelson
I have some common code that many programs call that writes messages to a log file. It looks something like... if (open(LOG, ">>$logfile")) { print LOG $message; close(LOG) || warn "unable to close log file $logfile"; } else { warn "unable to open $logfile for appending"; } The problem