- or download this
if ($server eq 'lsrch1') {
my %params = map { $_ => 1 } @lsrch1;
...
push (@lsrch1, $string);
}
}
- or download this
if ($server eq 'lsrch1') {
push @lsrch1, $string unless $params{$string}++;
}
- or download this
$ perl -Mstrict -Mwarnings -e '
my @strings = qw{a a a b b c d d e e e};
...
@strings: a a a b b c d d e e e
%params keys: a b c d e
@lsrch1: a b c d e