# snip my %hash; $hash{$_}=1 for (@updatelist); $hash{$_}=0 for (@storelist); for (keys %hash) { push @finallist, $_ if ($hash{$_}); }