in reply to STDERR going to string

You can try to use $SIG{__WARN__} handler instead.