in reply to Strange behavior with List::Util qw{first} on perl >= 5.20
$ 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" }
What do you get with non-hash?
$ 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
|
|---|