Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!cs.bu.edu!ckd From: ckd@cs.bu.edu (Christopher Davis) Newsgroups: comp.lang.perl Subject: sort -uniq in perl? Message-ID: Date: 8 Sep 90 01:24:20 GMT Sender: news@bu.edu.bu.edu Reply-To: ckd@cs.bu.edu (Christopher Davis) Organization: 1000000011000101, Inc. Lines: 15 I am doing a program which works with a dbm file, but doesn't "want" all the values it stores, so it saves a text file with a sorted array. The problem is that I don't see how to get rid of duplicate values (I am using sort() to combine the file with an array read in at runtime, and there are often duplicate values). Is there any way to get sort() to do the equivalent of sort -uniq? If not, what's the best way to do it (I assume piping to sort, but I'd like examples, as I'm still fuzzy on how to get piping to work well)? I'm using 3.0PL18 on SunOS 4.1. -- Christopher Davis, BU SMG '90 <...!bu.edu!cs.bu.edu!ckd> "Dammit, we're all going to die, let's die doing something *useful*!" --Hal Clement on comments that space exploration is dangerous