Jump to content
Clubplanet Nightlife Community

ATTN: COMPUTER PEOPLE...Where can I find this one file


Recommended Posts

program to remove duplicates and non-email addys from a list:


#! /usr/bin/perl

open (MAILING_LIST, "my_mailing_list.txt");
while (<MAILING_LIST>)
{
chomp;
next if $_ !~ /^([a-zA-Z\-_]+)@(([a-zA-Z\-_]+)\.)+([a-zA-Z]+)$/;
$unique_mails{$_} = 1;
}
close (MAILING_LIST);

open (NEW_MAILING_LIST, ">revised_mailing_list,txt");
foreach $mailID (sort keys %unique_mails)
{
print NEW_MAILING_LIST "$mailID\n";
}
close (NEW_MAILING_LIST);

This is not the most optimal way to do it... but it works. now all you need is a perl interpreter.... or if you really REALLY want, i can set it up so that you upload the file to a webpage and it spits out the list with duplicate addresses removed... but that will have to wait until tomorrow since i've got too much work to do... god, i hate being a grad student - i used to get paid to write things like this.

peaz,

rob

Link to comment
Share on other sites

Originally posted by sexxybabyd

omg id love u forever if u could do it for me :)

woo hoo! and there i was thinking i was going to have to work to win you over.

oh wait, just read linabina's post. shit - looks like i'm cynical again. dammit. fun while it lasted.... a geek can dream, right?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...