use Filter::Handle qw/subs/; # point STDERR to /dev/null, otherwise web server throws a 500 error if you print to STDERR, even with zero-ing out the output via () open(STDERR, ">/dev/null"); Filter \*STDERR, sub { fatal @_; #fatal is an internal sub to e-mail the devs () };