deadlock Message Board
[ November Full List | Reply ]

Re: Programming question Part II
From Jim on 16 November '98
replying to Re: Programming question Part II posted by Max

>>@lollipops = ("email1","email2","email3");
>>@candy = ("email1","email2","email3");
>>@popcorn = ("email1","email2","email3");
>>if ($FORM{'Lollipops'} eq "Yes") {
>> foreach $lolli_email (@lollipops) {
>> open (MAILOLLI,"|/usr/lib/sendmail -t");
>> print MAILOLLI "To: $lolli_email\n";
>> &rest_of_lolli;
>> close (MAILOLLI);
>> }
>Doing it in the script is OK, but every time the addresses change, you have to edit
>the script. How do you read in a text file of email addresses to send to?
>File would have:

The first of many logical next steps:

open (LOLLIFILE, "/path/to/lollifile");
@lollipops = <LOLLIFILE>;
close (LOLLIFILE);

Replies from other people:

Reply to this message

Required Details
Your name:

Optional Details
Home page title:
Home page URL:
(if you'd like to receive
automatic replies by email)

Your Message