Thanks for the suggestion. However I am trying to figure out how easily I could integrate that into my code.
I left out some of the details, but basically I am forking a series of commands which I first predefine. Some have single commands and some are combinations of commands. I can always do a "hack" by breaking up the commands e.g
job[0] = "com1 | com 2"
job[1] = "com3"
.
.
.
job[n] = "com100"
can become
job[0] = "com1 > tmp.out"
job[1] = "cat tmp.out >com2"
job[3] = "com3"
.
.
.
job[n+1] = "com100"
Ideally I was trying to find a solution like Crackers2's suggestion where I can do some "magic" on each command to get it to return the first exit code.
I will play around with that for a while and see if I can do that
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.