http://www.perlmonks.org?node_id=1034278


in reply to rerouting STDOUT

You will find the answer from perldoc perldoc:open


All is well