RE: Logging details

2002-05-13 Thread John Edwards
die "Can't append to error.txt: $!"; print ERROR $error; close ERROR; die "\n"; } John -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:04 To: [EMAIL PROTECTED] Subject: Logging details Is there a better way of l

Logging details

2002-05-13 Thread Shishir K. Singh
Is there a better way of logging the details in a file. E.g. I would like the error message to go into a file instead of going to the stderr if (system ($cmd)) { die "Error $!\n"; } I don't want to code the above as open (LOG,"> $logFile"); if (system ($cmd)) { print LOG "Error $!\