Is there a difficulty or problem with having an explicit return in your subroutine? That is a standard practice for me and I reject any code (in code reviews) that doesn't do so.
Keep in mind that return undef; is not the same as return; and it can lead to some unwanted pain and grief if that is not understood.
Update: You can find a good discussion about the difference between the two here: https://www.securecoding.cert.org/confluence/display/perl/EXP00-PL.+Do+not+return+undef
In reply to Re: Hope a subroutine will return undef by default
by boftx
in thread Hope a subroutine will return undef by default
by qj1020
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |