> [ron@savage.net.au - Tue Sep 27 16:49:52 2005]: > Using an explicit return, as suggested by MGS, instead of the + also works. > > Thanx. > > Would it be possible for Perl to output a warning in such cases? Implicit return can work, although explicit ones should be preferrably used. For an though programmer, these warnings would be superfluous and at best annoying. Besides that, if agreed upon, it would almost inevitably lead to an addition of warnings to the extent of being unmanagable due to other functions that have such 'unexpected' side-cases. I could imagine adding this functionality to the strict pragma along with the keyword 'return' - so "no strict 'return'" would disable that behavior. But I doubt that would break many existing scripts/modules out there; another, slightly less harmful, approach would be to leave 'use strict' as it is and make the behaviour optional.