Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Perl: the Markov chain saw
 
PerlMonks  

Re: get return value from jar file

by vinian (Beadle)
on Dec 05, 2011 at 12:44 UTC ( #941826=note: print w/ replies, xml ) Need Help??


in reply to get return value from jar file

check perlvar and you will get this

$CHILD_ERROR $? The status returned by the last pipe close, backtick (``) command, successful call to "wait()" or "waitpid()", or fr +om the "system()" operator. This is just the 16-bit status word returned by the traditional Unix "wait()" system call (or +else is made up to look like it). Thus, the exit value of the subprocess is really ("$? >> 8"), and "$? & 127" gives whi +ch signal, if any, the process died from, and "$? & 128" repo +rts whether there was a core dump.

update:

sorry, misunderstanding the question

you have got the return value of the backtick command. just as CountZero posted.


Comment on Re: get return value from jar file
Download Code
Re^2: get return value from jar file
by CountZero (Chancellor) on Dec 05, 2011 at 13:27 UTC
    And how does your answer enlighten the OP? Did he ask for the error status of the command?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      thanks for your reminding, i misunderstanded the question, and have update the answer.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://941826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2013-05-24 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (516 votes), past polls