Yep, you should change return; to return undef;. It is a very bad idea to use return; in a sub that otherwise only ever returns a single scalar.
- tye
In reply to Re: Preventing unintended list expansion inside hash literals. (return;)
by tye
in thread Preventing unintended list expansion inside hash literals.
by gregory-nisbet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |