undef %saw; $saw{$_}++ for @in; @out = keys %saw; #### undef %saw; @saw{@in} = (1) x @in; @out = keys %saw;