- or download this
my @list= qw(a b c a c);
my $w="kandabbbc";
...
@list = grep {!/\Q$a/} @list;
}
print $w;
- or download this
my %saw;
for (@list) {
next if $saw{$_}++;
# ...
}
- or download this
my @list= qw(a b c a c);
my $re = join '|', @list;
- or download this
my $re=join "", @list;
$re="[$re]";