use CGI; ..... my $query = new CGI; .... print $query->startform(-method => 'GET'); ... #obtaining the emails that were intended for the user. #printing the To, Subject,etc. #Calling sub print_checkbox for the emails that were stripped for the user. ... print "
",$query->reset; print "
",$query->submit;
print $query->endform;
# match_form called.
sub print_checkbox
{
#print" I am here $_[0]
";
print "
Do you want this e-mail message? ", $query->checkbox_group(-name =>'e_check',-values=>[$_[0]],-label=>[$_[0]]);
}
sub match_form
{
my $matcher="meep.tc.onramp.ca"; #for testing purposes
my @turned_on = ($query->param('e_check'));
print join(" ", @turned_on), "###\n";
my $email_checked;
print " I am in end_form before for each loop
";
foreach $email_checked (@turned_on){
if ($email_checked =~ /$matcher/)
{ #this part of the code should be executed
#for all the emails checked.. yet, executed only sometimes
#qmail-inject the mail
}
else
{
print "Nothing Equals, $email_checked
";
}
}
}