in reply to CGI.pm Submit inconsistency

You've got some renegade indentation going on there. Anyways, a few things to watch out for.

When putting a scalar into a regular expression, be sure to encapsulate it properly. Remember that '.' is a special character in regexp context.
if ($email_checked =~ /\Q$matcher\E/)
Also, you can declare your looping variable within the loop itself, like this:
foreach my $email_checked (@turned_on)
Provided your @turned_on array is populated correctly, which I'm only presuming since the output of your debugging code is not shown, then this should work. Are you sure you're actually getting a series of "Nothing Equals..." messages?

Replies are listed 'Best First'.
Re: Re: CGI.pm Submit inconsistency
by kanabrian (Initiate) on Sep 26, 2002 at 18:58 UTC
    @turned_on remains empty even when I have checked boxes. However, it is not always empty. Sometimes, @turned_on has the right checked boxes. For example, the script may function as required when I visit the webpage now. Then it does not if I refresh or so.(randomly though). Can't seem to obtain any pattern. The inconsistency is bothering me. Would it have to do anything with the browser(although I seriously doubt that). Could it be because I am invoke the script while another process is using it? Thanks