Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Strange behavior with List::Util qw{first} version 1.38

by Anonymous Monk
on May 26, 2015 at 21:34 UTC ( [id://1127899]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MData::Dump -e "%f = qw/ A A B B C C/; dd( grep { lc $_ eq q/c
    +/ } keys %f ); dd(\%f)"
    "C"
    { A => "A", B => "B", C => "C" }
    
  2. or download this
    $ perl -E"say grep { lc $_ eq q/c/ } qw/ A B C/"
    C
    
    $ perl -MList::Util=first -E"say first { lc $_ eq q/c/ } qw/ A B C/"
    C
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-25 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found