You are capturing the output of a backtick operator. One thing is missing from this, the actual status of that command.

This might be helpful:
PerlVar and new ${^CHILD_ERROR_NATIVE} variable in Perl 5.10

${^CHILD_ERROR_NATIVE}
The native status returned by the last pipe close, backtick (`` ) command, successful call to wait() or waitpid(), or from the system() operator. On POSIX-like systems this value can be decoded with the WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG and WIFCONTINUED functions provided by the POSIX module.

Under VMS this reflects the actual VMS exit status; i.e. it is the same as $? when the pragma use vmsish 'status' is in effect. This variable was added in Perl v5.10.0.

I am thinking that this would give you the summary of "it worked or it didn't work?". Maybe that is helpful? Parsing the output of the command seems to be a difficult way to do that?

If you want the last line of the backtick output, you can assign that to an array and then just look at the last line. On Windows:

my @out = `help copy`; print $out[-1]; #the last line of output

In reply to Re: Perl 5.10.1 - compare external program output with a list of known error codes by Marshall
in thread Perl 5.10.1 - compare external program output with a list of known error codes by malokam

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.