Thanks for replying.
Two questions and also, I think I may have missed some detail in my question.
(1) When I tried your above code, it always prints 255.
(2) What does >> 8 do? I searched online and was led to the "die"explanation, but couldn't find what >>8 means.
Now, the detail I missed in my initial question was that:
My code is like below:
$output = "Folder/OtherTool arguments_to_the_other_tool. "
I had earlier mentioned only "Folder/OtherTool", so just clarifying here.
in reply to Re: How to catch the return code of another program?
in thread How to catch the return code of another program?