in reply to Re: subroutine return ternary output
in thread subroutine return ternary output

Yes muntfish I did create a typo when submitting to perlmonks.
return (0 eq system "$KSH_SCRIPT"?$1:2);
should be...
return (0 eq system "$KSH_SCRIPT"?1:0);
Using your advice and changing my paran's made it work:
return (0 eq system "$KSH_SCRIPT")?1:0;
All is well now. Interestingly enough both "eq" and "==" work as expected on testing the return code. I assume it comes back as an integer and perl converts for us? Thanks for the help!!