http://www.perlmonks.org?node_id=534095


in reply to Re: Miscellaneous.pm?
in thread Miscellaneous.pm?

Are you aware of List::MoreUtils? It contains a "uniq" function much like this.

BTW, there seems to be bug in your routine. I think you meant something like !$seen{$_}++.

That illustrates the value of having even a "simple" routine in a re-usable module!