earl_the_perl has asked for the wisdom of the Perl Monks concerning the following question:
Failed Attempt:sub didScriptSucceed { if (0 eq system "$KSH_SCRIPT") { return 1; } else { return 0; } }
Thanks in advance for anyone who can provide some insight.sub didScriptSucceed { return (0 eq system "$KSH_SCRIPT"?$1:2); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subroutine return ternary output
by muntfish (Chaplain) on Sep 07, 2004 at 14:12 UTC | |
by earl_the_perl (Novice) on Sep 07, 2004 at 14:32 UTC | |
|
Re: subroutine return ternary output
by Random_Walk (Prior) on Sep 07, 2004 at 14:41 UTC | |
|
Re: subroutine return ternary output
by shenme (Priest) on Sep 07, 2004 at 14:26 UTC | |
|
Re: subroutine return ternary output
by eserte (Deacon) on Sep 07, 2004 at 14:12 UTC | |
|
Re: subroutine return ternary output
by ysth (Canon) on Sep 07, 2004 at 17:39 UTC | |
by earl_the_perl (Novice) on Sep 08, 2004 at 13:15 UTC | |
|
Re: subroutine return ternary output
by Anonymous Monk on Sep 07, 2004 at 15:08 UTC | |
|
Re: subroutine return ternary output
by sintadil (Pilgrim) on Sep 08, 2004 at 01:27 UTC | |
by earl_the_perl (Novice) on Sep 08, 2004 at 13:13 UTC |