in reply to capturing exit status of a process
The only difference I can see is that the Perl Cookbooks example *includes* error handling ("open(...) or die ...")on the open and close - I think that's what you are looking for to tell you if it succeeded or failed.$pid = open(WRITEME, "| program arguments") or die "Couldn't fork: +$!\n"; print WRITEME "data\n"; close(WRITEME) or die "Couldn't close: $!\n";
HTH.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: capturing exit status of a process
by blackrose (Initiate) on Aug 09, 2004 at 14:43 UTC |