I just re-read my post and I think it was a bit confusing.
here are some better sorted details:

* The job im running in cron is a perl script (every few minutes).
* I have the cron variable MAILTO (which is the problem - I can't remove it - it's needed for other jobs).
* Im not the only one in the MAILTO list.

what im trying to do is :
1. stop the standard error from being printed so that it won't cause mails to be sent constantly.
2. read the standard error to recover from problems and ignore things that are not problems (like CVS printing things to STDERR for example).

the actual command that im running is :
system("CVS -d :ext:....");
and i would like to get it's STDERR to a variable and (if possible) not through a file.

In reply to Re: Capturing STDERR to a variable by oron
in thread Capturing STDERR to a variable by oron

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.