in reply to Find characters in ALL strings
Alternative:
my %counts; my @commons = grep { ++$counts{$_} == @s } map { my %seen; $seen{$_}++ for /./sg; keys %seen } @s;
or
use List::MoreUtils qw( uniq ); my %counts; my @commons = grep { ++$counts{$_} == @s } map { uniq /./sg } @s;
Tested.
|
|---|