one way is to redirect STDERR. put the following code at the beginning of your 
program, and all errors will be printed to errorlog.

open (STDERRBACKUP, ">&STDERR");  ## create backup copy of STDERR

open(STDERR, ">>errorlog") or die "problem redirecting STDERR.";
print STDERR "This text was sent to errorlog. \n";

## put the rest of ur program here

   
i got that from coriolis' perl black book.
hope this solve ur problem.


Lei Won

 

  Jenda Krynicky <[EMAIL PROTECTED]> wrote: From: "Alex Harris" 
> I need to place code that leaves my program entirely if certain errors
> occur (mostly on opening a file). However I don't want ANY messages
> going anywhere except my $errlog. (I noticed die, seem to always show
> a message at the command line). What's the best way to handle say the
> following then if an error occurs?

exit()

Jenda

=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.

Reply via email to