Hi guys.
For some reason my old a/c JennyW isn't working, so here I am...
I have a mailing list that I'm having problems with. However, I used to play around and code with Perl a little bit (around 5 years ago), I basically forgot it all.
What's happening:
- Inside the Admin file for my code. There's a panel where I can view all of the email addresses that I have collected so far.
- Anyway, many people put in bogus address
- There's a button in the Admin panel that deletes any email I select.
- The problem is it's not deleting anything.
- I know I must have touched something in the code...something simple...but I don't know what.
- However, I do know...at least I "think" what the piece of code is that running the problem:
Do you guys know what's wrong?
I know this post is HUGE, but if anyone could give me any direction, It'd be appreciated!
Thanks,
Jenny
For some reason my old a/c JennyW isn't working, so here I am...
I have a mailing list that I'm having problems with. However, I used to play around and code with Perl a little bit (around 5 years ago), I basically forgot it all.
What's happening:
- Inside the Admin file for my code. There's a panel where I can view all of the email addresses that I have collected so far.
- Anyway, many people put in bogus address
- There's a button in the Admin panel that deletes any email I select.
- The problem is it's not deleting anything.
- I know I must have touched something in the code...something simple...but I don't know what.
- However, I do know...at least I "think" what the piece of code is that running the problem:
Code:
#########################################################
# use a foreach loop to delete the selected entry files #
#########################################################
&admin_header;
foreach $entry(@entries) {
$count=0;
foreach $list(@list) {
if ($list =~ /$entry/i) {
splice(@list, $count, 1);
print "$entry was removed.<br>";
}
$count++;
}
}
&back_button;
&admin_footer;
&flock($listdata.".lock");
open (list, ">$listdata") or &error("Unable to write to the data file");
print list @list;
close(list);
&unflock($listdata.".lock");
exit;
}
Do you guys know what's wrong?
I know this post is HUGE, but if anyone could give me any direction, It'd be appreciated!
Thanks,
Jenny
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)