in reply to subroutine return ternary output
System is an exception to this since it actually returns the number 0, which is "0" in string context, but it's still a bad habit to get into. At least make it 0 ==, not 0 eq.# both of these print nothing perl -we'$x = 1; print "hmm" if 0 eq not $x' perl -we'$x = 0; print "hmm" if 0 eq not $x'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: subroutine return ternary output
by earl_the_perl (Novice) on Sep 08, 2004 at 13:15 UTC |