Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: List::Util - Bug in first?

by kyle (Abbot)
on Feb 18, 2008 at 14:14 UTC ( #668554=note: print w/ replies, xml ) Need Help??


in reply to List::Util - Bug in first?

The return value of first is always a scalar. I think it would be a bug to put it in list context as if it's going to return anything other than one thing. You might want it in list context with other things if the result of first will be a member of that list. In that case, returning nothing could ruin the placement of the other items.


Comment on Re: List::Util - Bug in first?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-10-24 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (132 votes), past polls