BazB has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow Monks.

A quick question: are filehandles flushed correctly when perl exits following a die(), croak() or any other exception?

I'm concerned that any log messages sitting in a buffer would be lost.

Cheers.

BazB


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

Replies are listed 'Best First'.
Re: Are filehandles flushed on a die() ?
by broquaint (Abbot) on Jun 30, 2003 at 13:06 UTC
    Indeed they are. Because die is triggered from within perl it is dealt with nicely and all the appropriate things are performed upon shutdown as it would if exit had been called (more or less).
    HTH

    _________
    broquaint