Take a look at perldoc open and search for each instance of 'open STDOUT'. It has example code on how to duplicate and redirect both STDOUT and STDERR.
Grandfather's code will probably work for you, but it's good to know where in the documentation you can look for the random times you need to do this and have forgotten how.
In reply to Re: how to control/redirect print()
by wind
in thread how to control/redirect print()
by smile4me
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |