Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: get return value from jar file

by vinian (Beadle)
on Dec 05, 2011 at 12:44 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: get return value from jar file
by CountZero (Bishop) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://941826]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found