That's an awful lot to ask of an at-exit handler. The problem is, what if something in that sequence -- sending out a page, for example -- has an error itself?
Instead, I'd recommend that you wrap the "main" part of the program in an
eval, which will trap any
dies that occur in it. Then you can handle those errors in the main flow of the program, rather than in an at-exit (i.e.
END) handler.
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.