Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > redirecting stdout/stderr to logfile

Reply
Thread Tools

redirecting stdout/stderr to logfile

 
 
dmedhora@gmail.com
Guest
Posts: n/a
 
      05-25-2006
Hi all,

I have a perl program in which I use Expect to log in to another
computer
and run a command. My mail perl program takes a few arguments on the
command line. Most the of the output on screen is from the Expect
module.

I also take in values from the stdin

How can I redirect the output on screen into a logfile ? Something like
tee
But from within the perl program itself ?

So that whatever output is obtained on stdout/err is also redirected to
a logfile?

Thanks

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-25-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:1148522375.388135.180740
@u72g2000cwu.googlegroups.com:

> How can I redirect the output on screen into a logfile ? Something like
> tee But from within the perl program itself ?


Since you don't show code, there isn't much we can say other than to point
you to:

http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm

Also, see

perldoc perlopentut

Playing with STDIN and STDOUT

Sinan

--
A. Sinan Unur <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc...uidelines.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logfile analysis API Andreas Java 0 05-10-2005 06:53 PM
How to access logfile directory path from IIS =?Utf-8?B?TXVubnU=?= ASP .Net 0 04-22-2005 04:34 PM
Is there a d/l logfile in Win XP Pro? Jeff Computer Support 1 07-22-2004 07:34 AM
Help analyze HijackThis logfile, Please Cynthia K. Computer Support 7 07-15-2004 01:02 AM
Logfile Nick Withers Computer Support 1 11-18-2003 11:35 AM



Advertisments