From owner-freebsd-questions Tue Jul 30 14: 3:30 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B53E37B400 for ; Tue, 30 Jul 2002 14:03:27 -0700 (PDT) Received: from 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com [216.164.225.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7358943E31 for ; Tue, 30 Jul 2002 14:03:26 -0700 (PDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Received: from localhost (uminac@localhost) by 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (8.11.6/8.11.6) with ESMTP id g6UL4HO84113 for ; Tue, 30 Jul 2002 17:04:17 -0400 (EDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Date: Tue, 30 Jul 2002 17:04:17 -0400 (EDT) From: "Christopher J. Umina" To: FreeBSD Question Mailing List Subject: checking if something is already in an array Message-ID: <20020730170022.H81391-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I'm really stupid lately with Perl and stuff, but I got this list of screen names and I made it into an array in perl called @sns. I want to count the amount of times each name shows up in that array and I want to make an array of each name in the original array, but only occuring once. adarc22 adarc22 adarc22 adarc22 alldayyesterday alldayyesterday babygurl2835 babygurl2835 bctictac8 bctictac8 beth42085 cc skillet ccgirl436 ccgirl436 devilchik205 dublindamien e is happy e is happy fritzilldo ilaughatyourlife jea9f2oo3 katsie236 kelzy16 lauren md 6 9 mastahuy85 meikman99 meikman99 reggie645 reggie645 reggie645 reggie645 reggie645 reggie645 reggie645 russh2112 russh2112 sllissa85 superman lmd 69 ...is my original array but I want a new array with each name in this array appearing only once and count each name's occurance in an additional array, even a 2d array works. (if you can do that in Perl...?) Thanks a lot, Christopher J. Umina To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message