Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 17:04:17 -0400 (EDT)
From:      "Christopher J. Umina" <uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com>
To:        FreeBSD Question Mailing List <questions@freebsd.org>
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>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020730170022.H81391-100000>