in reply to Re: What does !$saw{$_}++ means
in thread What does !$saw{$_}++ means

I don't remember if it was quicker, but there also is the non-looped version:
undef %saw; @saw{@in} = (1) x @in; @out = keys %saw;
I haven't benchmarked it, but I've frequently heard it asserted that even faster is
undef %saw; @saw{@in} = (); @out = keys %saw;
That is, using undef as your values (so you don't need the increment or to create the list of ones).