Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Divert STDOUT temporarily

by davido (Cardinal)
on Apr 27, 2020 at 19:15 UTC ( [id://11116134]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        #!/usr/bin/perl
        open(my $oldout, ">&STDOUT")     or die "Can't dup STDOUT: $!";
    ...
    
        print STDOUT "stdout 2\n";
        print STDERR "stderr 2\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found