This batch file in turn executes another batch file after some processing.This second batch file dumps either success or failure messages on to the command prompt

Can you modify your system calls so they direct output?
file2 1>out.file 2>err.file

don't forget that system "bypasses any shell processing of the command" if you use more than 1 argument.

## assumes $file2 is executable ## won't work system( $file2, $out, $err ) ## will work system( "$file2 $out $err" )

You may or may not want to use this method, though, depending on your actual circumstances. Later, you can read $out and $err if need be.

Will perl for money
JJ Knitis
(901) 756-7693
gt8073a@industrialmusic.com


In reply to Re: Collecting the output of command prompt by gt8073a
in thread Collecting the output of command prompt by Anonymous Monk

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.