http://www.perlmonks.org?node_id=137464


in reply to Re: (crazyinsomniac) Re: Coding superstitions
in thread Coding superstitions

I would replace that entire routine with the ? thingie, as in
sub fred { return ( ( $_[0] 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.

--t. alex

"Excellent. Release the hounds." -- Monty Burns.