M
Marc Eggenberger
Hi there.
I havent done perl coding for some years now and forgot a lot so bear
with me ...
I open a text file, read it line by line and do some splitting and
substr to get an emailadress of the line. Now the textfile has some
10k lines and a lot of dublicate mail addresses. I only need each
emailaddress once .. a bit like a select distinct emailadress would be
in SQL.
My though now was to create a array and test if the address is already
in the array and if not push it into the array. I dont need to have
the position of the address in the array ... so I thought of something
like
if(! exists $address_array[$address]=
{
push(@address_array,$address);
}
this of course does not work ...
how would I achive my goal?
Thanks for any help
Marc
I havent done perl coding for some years now and forgot a lot so bear
with me ...
I open a text file, read it line by line and do some splitting and
substr to get an emailadress of the line. Now the textfile has some
10k lines and a lot of dublicate mail addresses. I only need each
emailaddress once .. a bit like a select distinct emailadress would be
in SQL.
My though now was to create a array and test if the address is already
in the array and if not push it into the array. I dont need to have
the position of the address in the array ... so I thought of something
like
if(! exists $address_array[$address]=
{
push(@address_array,$address);
}
this of course does not work ...
how would I achive my goal?
Thanks for any help
Marc