in reply to Find characters in ALL strings
my @strings = qw( 1234579 234789 4578 ); my %c = map { $_ => 1 } split //, shift @strings; %c = map { $_ => 1 } grep { $c{$_} } split // for @strings; print keys %c, "\n";
This will give you a list of characters, but it doesn't preserve order. When I ran it, I got '47', but it could just as easily have been '74'. I can't tell from your problem definition whether that's relevant or not, but I suspect it's not.
|
|---|