my @intersection = grep { defined } @{ { map { lc ,=> $_ } @a } } { map { lc } @b };