No such thing as a small change | |
PerlMonks |
Re: looking for a good idiom: return this if this is trueby Dr. Mu (Hermit) |
on Mar 06, 2005 at 19:00 UTC ( [id://437074]=note: print w/replies, xml ) | Need Help?? |
The fact that this question has to be asked at all and the contortions necessary to answer it points to a deficiency in Perl's semantics. The following code would be simple and effective were it not for the fact that a return with no argurments is equivalent to return undef (or return () in list context). By making the undef or () mandatory in order to clear the "last expression evaluated" this whole discussion could have been avoided.
In Section
Seekers of Perl Wisdom
|
|