I've been banging my head against a wall trying to figure out a problem I first raised here. I have tried eval and some hairier possibilities, but nothing got me the errors/warnings coming from java command line tools like Xalan and FOP . Was it Java, Perl or me? Of course, it was stupid little me.

I figured it was time to take the dive (leap of faith?) into Interprocess Communications and follow tilly's advice. I settled in with dread and excitement to read Lincoln Stein's new book Network Programming with Perl. On page 43 my eyes popped out of my head, when I read, "On UNIX systems, you can use the Bourne shell's output redirection system to combine the subprocess's standard error with its standard output like this: $ls_output = `ls 2>&1`; Now $ls_output will contain both the standard error and the standard output of the command." Thank you Lincoln Stein for that gem (2>&1), that removes a few barriers I've been chipping away at for a few weeks now. I was fearing I was going to have to adopt an all Java solution, which would suck. But alas, Perl (and its community) comes through again.

I'm going to work on some applications with this and post them to the snippets section. Do you see any warning flags with this kind of solution? I'd also like to know if any of you have experience suggesting additions to the perldocs. If this gem had been there and in the right place(s) I would have saved hours of development time.

Get Strong Together!!

Edit: chipmunk 2001-05-15


In reply to redirecting standard error with backticks by aardvark

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.