in reply to How can I tell at run time that my script is writing to STDERR?
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.print STDERR "prints...\n"; close(STDERR); print STDERR "doesn't print...\n" or print "this was bound to fail\n";
open(STDERR,'>/dev/null'); print STDERR "doesn't fail so this..." or print "...won't print";
|
|---|