in reply to subroutine return ternary output
It looks like a typo to me: you have $1 in the second example, and this is probably not defined. Also your brackets may be misplaced.
This should work in the same way as your original:
return (0 eq system "$KSH_SCRIPT") ? 1 : 0;
Now, whether you should be comparing the return code of system with "0" (eq is a string comparison) is a different matter...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: subroutine return ternary output
by earl_the_perl (Novice) on Sep 07, 2004 at 14:32 UTC |