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


in reply to Hope a subroutine will return undef by default

You could make undef; the last statement in each of your functions...