Home : General : Perl Programming :

General: Perl Programming: Re: [shiner] form script modification: Edit Log

Here is the list of edits for this post
Re: [shiner] form script modification
To match the address:

Code:
my $found = 0;

open (EML, "<$some_database") or die "Could not open $some_database: $!";
while (chomp ($_ = <EML>)) {
if (/^\Q$in{'Email_Field'}\E$/) {
$found = 1;
last;
}
next;
}
close EML;

...then it is just a matter of checking whether $found equals 1 or 0. If it is 0 you can print the email to the file, otherwise show an error...eg....

$found ? error() : print_to_file();

Last edited by:

Paul: Jun 14, 2002, 10:43 AM

Edit Log: