in reply to Re: exit value not passed back
in thread exit value not passed back

Well I tried exit value of 3, but still getting $? returned as 256 and when I shift it right by 8 bits I still get 1 !!!

Mags

Replies are listed 'Best First'.
Re^3: exit value not passed back
by muntfish (Chaplain) on Oct 06, 2004 at 10:43 UTC

    That is odd. I used your code as the basis of a test program and got results as expected, after the system() returns, $? = 768, shift it right 8 bits and you get 3 (which is what I had called.pl exit with).

    This is on Unix (HP-UX) by the way. Things may vary on other platforms - I think that is what the perldoc extract I quoted before is trying to say. What OS are you using?


    s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&