in reply to stdout back to the normal ??
Of course, if you're going to run a system call, you might just use shell redirection to the file. There's more than one way to tame this camel. (Caveat added because I'm not sure redirecting STDOUT in a Perl parent will affect the non-Perl child.){ local *NEWOUT; open(NEWOUT, "> $file") or die "Cannot open ($file): $!"; my $oldfh = select(NEWOUT); # print some stuff here select($oldfh); }
|
|---|