in reply to
Re: (crazyinsomniac) Re: Coding superstitions
in thread Coding superstitions
I would replace that entire routine with the ? thingie, as in
return ( ( $_ eq 'ooyah' ) ? 1 : 0 );
Gee, I didn't realize until I was replying that you used ==
and I corrected that to eq
. Not bad for some guy who wrote C code forever.
And I disagree with the lecturer about leaving the last return to dangle -- what he/she suggested is obsfucation, and you're not doing yourself any favours with that approach.
"Excellent. Release the hounds." -- Monty Burns.