Re: sending output to file and terminal



Hi lakshmi,

I think we can use the "Tee" module for that.

http://search.cpan.org/~dagolden/Tee-0.13/lib/Tee.pod

-srini

lakshmi priya wrote:
Hi all,

I have written a perl script that prints the output to the terminal. I
also want to write the output to a file. So, what I have done is write the
output to a file and then print the file. I was just wondering if there any
way to write to both - terminal and file at the same time?

With regards,
laddu


.



Relevant Pages

  • Using tee with Perls system command
    ... I want to call/run another program with a perl script - and I need ... Without using perl I would just use tee. ... Executing ls | tee out.txt ...
    (comp.lang.perl.misc)
  • Re: write to stdout and another file at the same time.
    ... To the screen 2) A file that acts as our log file. ... Please keep in mind that I need to do this from inside the perl script. ... it had something to do with |tee. ... John ...
    (comp.lang.perl.misc)