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 = first { lc $_ eq 'qwe' } keys %h; print $f" qwe