Rather than capturing your own STDERR, why not try wrapping your program with a short one that uses IPC::Open3 to launch the original program with STDERR captured.
You can also do this kind of redirecting in the command-line invocation with any decent shell.