Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Strange behavior with List::Util qw{first} on perl >= 5.20

by dmitri (Priest)
on May 26, 2015 at 21:09 UTC ( [id://1127895] : note . print w/replies, xml ) Need Help??


in reply to Strange behavior with List::Util qw{first} on perl >= 5.20

The hash does seem to have something to do with it. Strawberry Perl 5.20.0:
C:\Users\>perl -e "use List::Util qw(first); my $f = first { lc $_ eq +'qwe' } qw(QWE); print $f" QWE C:\Users\>perl -e "use List::Util qw(first); %h = qw(QWE 1); my $f = f +irst { lc $_ eq 'qwe' } keys %h; print $f" qwe