Front page | perl.beginners |
Postings from April 2002
Re: Array question
Thread Previous
From:
Glenn Meyer
Date:
April 1, 2002 09:09
Subject:
Re: Array question
Message ID:
0204011105020D.14683@main
Allison, Check out pages 133 - 135 in Learning Perl (3rd Edition) - the
section "AutoIncrement and Autodecrement" section _ particularly the top of
page 135 has an example for just this very question! I just read that last
week so it popped right up in my mind.
If you don't have the book, holler back to me off-line and I will type out
the code - it is not too long.
Glenn.
On Monday 01 April 2002 10:08 am, Allison Ogle wrote:
> Hi,
>
> I have a datafile with a list of names like
>
> Ana
> John
> Mike
> Tracy
> John
> Luke
> ....
> etc.
>
> I don't know how long the list is and eventually in the list some of the
> names will repeat. I want to put these names in an array but I don't want
> to repeat any names in the array and I want to keep a count of how many
> times the name appears in the list. Does anyone have any ideas or
> suggestions? Thanks,
>
> Allison
Thread Previous