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

oh .okay i actually tried it before i opened a file handle like

open STDOUT, '>', "files.out"

and then closed the filehandle at end of script , but it throws a compilation error at first print staement

Replies are listed 'Best First'.
Re^3: STDOUT msg routing
by Corion (Patriarch) on Feb 25, 2015 at 10:28 UTC

    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?