On Monday, May 13, 2002, at 12:36 , Jackson, Harry wrote: [..] > > sub unique { > foreach (@_) { $_{$_}++} > return [keys %_]; > } > > > Or you could butcher the grep method as I have done to get the following > > sub GrepMe { > return [ grep { not $\{$_}++ } @_ ]; > }
harry, if you don't mind a piece of personal advice. You clearly need more than the usual perldoc Benchmark you should seriously think about seeking therapy. http://www.wetware.com/drieux/pbl/BenchMarks/harryGrepUniqLists.txt ciao drieux --- "I've started my own eletro-shock therapy." "Well up the voltage." - Real Genius -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]