Many thanks for the replies; they've given me a lot to think about. The reason I'm concerned about what happens at the end of my code is hubris, pure and simple. My code is intended for public consumption, and as I am collecting the output and processing it further, it occurred to me that someone else might want to do the same sort of thing in Perl, and that by leaving STDERR in an unpatriotic state might get me more curses than plaudits. I'm going to have to play around before I decide which way to go, but I don't feel anything like as scared as I did a few hours ago!