I\'m looking for an example of redirecting stdout to a file using Perl. I\'m doing a fairly straightforward fork/exec tool, and I want to redirect the child\'s output to a f
The child itself can do select $filehandle to specify that all of its print calls should be directed to a specific filehandle.
select $filehandle
print
The best the parent can do is use system or exec or something of the sort to do shell redirection.
system
exec