in reply to Re: Catch warning from external module
in thread Catch warning from external module

Put this at the very beginning of your code before anything else

BEGIN { $| = 1; open (STDERR, ">&STDOUT"); print qq~Content-type: text/html\n\n~; }
Works for most things that matter...