redirecting stdout/stderr to logfile

Discussion in 'Perl Misc' started by dmedhora, May 25, 2006.

  1. dmedhora

    dmedhora Guest

    Hi all,

    I have a perl program in which I use Expect to log in to another
    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

    I also take in values from the stdin

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

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

    dmedhora, May 25, 2006
    1. Advertisements

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

    Also, see

    perldoc perlopentut

    Playing with STDIN and STDOUT


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

    comp.lang.perl.misc guidelines on the WWW:
    A. Sinan Unur, May 25, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.