if ($server eq 'lsrch1') { my %params = map { $_ => 1 } @lsrch1; if(! exists($params{$string})) { push (@lsrch1, $string); } }