?
Solved

Deleting selected email address from a txt file?

Posted on 1998-09-14
6
Medium Priority
?
161 Views
Last Modified: 2010-03-05
I have a sign up form that writes the users email address to a txt file and I would like to include an admin interface so that I can pick and choose email addresses that should or need to be removed from the txt file.
0
Comment
Question by:rgoniea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:rgoniea
ID: 1204847
Edited text of question
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1204848
Is there a question here?
0
 

Author Comment

by:rgoniea
ID: 1204849
Yes it is right there, I want to add an admin section to my script to remove old or unwanted email addresses from the text file that stores the email addresses. How is this accomplished??
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Expert Comment

by:martinag
ID: 1204850
Well, I might give you some hints.

* First, you've got to have a password... Use encrypt.
  Either it will be entered once and then the admin-page is shown OR it is to be entered at the admin-page when a change is made.

* Listing of addresses.
  You can add them to a <SELECT> tag in the admin-page on the fly OR every time an address is added/changed/deleted.

* Delete addresses
  The selected address is removed from emails.txt or whatever file you are using.
  $file =~ s/$remove\n//;

Such script(s) shouldn't be too difficult.

Martin
0
 
LVL 1

Accepted Solution

by:
stormerider earned 140 total points
ID: 1204851
Or also do something like this:

foreach $email (@arrayofemails) {
   print "<INPUT TYPE=CHECKBOX VALUE="$email">$email<BR>\n";
}

And then in the CGI that would remove them, you take the ones that are passed to the CGI because they are checked and s///g them. If you have an email address I can also mail you a way to do it via TEXTAREA tags if it isn't a 30K+ file (Browser limitations in displaying TEXTAREAS).
0
 

Author Comment

by:rgoniea
ID: 1204852
Stormrider, I am very new to writing Perl programs, could you explain with further code. What would be the process for opening the txt file and listing the email addresses and then deleting the ones I wanted too?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question