Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Redirecting STDOUT and standard error to file

by jfroebe (Parson)
on Sep 08, 2005 at 20:24 UTC ( [id://490309]=note: print w/replies, xml ) Need Help??


in reply to Redirecting STDOUT and standard error to file

Hi

To do so, you would either have to write to STDOUT and to a text file in your sample1.pl OR write a variation of the tee program. Something like:

sub print_out { my $text = shift; my $FH = shift; print $text; print $FH $text; } print_out "hi there\n";

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Log In?
Username:
Password:

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

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

    No recent polls found