in reply to Re^2: STDOUT msg routing
in thread STDOUT msg routing

The way you showed is the usual way to redirect a filehandle to a (different) file in Perl.

Maybe you can tell us the compilation error?