I am trying to send two parameters from one perl script to another. When the child finishes, I want to capture the output. Here is line
open(LDBHIER, "ldbtest.pl -e aa100001 -t 123|") || die "dead";
the idea is that ldbtest.pl receives the two values and sticks them in $opt_e, and $opt_t )using the Getopt::Std module. When that program finishes, I believe that the output is put in the LDBHIER file-handle but I get an error message
Broken Pipe
sh: -t: not found
I was able to get this to work when I had one parameter and I am able to run
ldbtest.pl -e aa100001 -t 123
from the unix prompt, but I am afraid that I am new at this and what I have read about forks, et al has just confused me a bit.
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.