Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Preventing unintended list expansion inside hash literals. (return;)

by tye (Sage)
on Jan 07, 2017 at 19:11 UTC ( #1179140=note: print w/replies, xml ) Need Help??


in reply to Preventing unintended list expansion inside hash literals.

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        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1179140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2020-09-18 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (113 votes). Check out past polls.

    Notices?