in reply to rerouting STDOUT

You will find the answer from perldoc perldoc:open


All is well