in reply to How can I tell at run time that my script is writing to STDERR?

What you can do to prevent anything from beeing to STDERR is close the file descriptor :
print STDERR "prints...\n"; close(STDERR); print STDERR "doesn't print...\n" or print "this was bound to fail\n";
But any entity that tries to write to STDERR will fail doing that, so you should also reopen STDERR to /dev/null to avoid that.
open(STDERR,'>/dev/null'); print STDERR "doesn't fail so this..." or print "...won't print";