Hello great Monks,
I seek thy wisdom!

This is what my perl program looks like!

close(STDOUT)
close(STDERR)

open (STDOUT, ">mylog.log") || die "could not open log\n";
open (STDERR, ">myerr.log") || die "could not open error log\n";

{
Some more perl syntax...
}

close(STDERR)
close(STDOUT)

When I run this perl program on Solaris (SYSTEM V UNIX release) the STDOUT and STDERR stuff is actually written to the .log files. But when I use the same perl program on an NT machine, everything works fine in terms of what the program is supposed to do, but the STDOUT and STDERR is not getting written to the .log files.

The reason I am redirecting the output to the .log files is because I want to look at it after the program is done doing what it should.

Please advise as to what I can do to get it working on NT machine. Thank you

-ginju

In reply to Does redirectiong the STDERR/STDOUT work well on WINDOWS NT? by ginju

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.