Path: utzoo!attcan!uunet!pmafire!uudell!milano!cs.utexas.edu!usc!ucsd!pacbell.com!ames!fxgrp!grady From: grady@fx.com (Steven Grady) Newsgroups: comp.lang.perl Subject: uniq'ing arrays Message-ID: <1990Nov21.021344.16038@fxgrp.fx.com> Date: 21 Nov 90 02:13:44 GMT Sender: news@fxgrp.fx.com (News) Reply-To: grady@postgres.berkeley.edu Organization: FXD/Telerate, Mountain View, CA Lines: 13 grep is a useful unix utility that has a parallel perl operator. What about uniq? I'd like to see uniq (or something) that strips out the duplicates in an array. It would be cool if it were built into perl. Meanwhile, has anyone written an efficient routine to do this? Linear time would be nice. I'd like one that doesn't require the array to be sorted. I could write one myself, but I thought I'd avoid duplicating code.. -- Steven grady@fx.com Birds of prey know they're cool.