Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Redirecting Standard Output inside perl

by soonix (Canon)
on Nov 09, 2017 at 13:15 UTC ( [id://1203035]=note: print w/replies, xml ) Need Help??


in reply to Redirecting Standard Output inside perl

Before knowing Capture::Tiny, I did it with something like
... my $mode = '>'; if ($option eq 'append') { $mode = '>>'; }; close STDOUT; open (STDOUT, $mode, $fname) or die "cannot open (STDOUT) $fname: $!"; ...
updated module name … well, I do like cats :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1203035]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-20 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found