$datafile = "/web/home/data/userpass.dat"; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $FORM{$name} = $value; } $string = $FORM{'mail'}; open(INF,$datafile); @mydata = ; close(INF); $count = 0; foreach $i (@mydata) { chomp($i); ($user,$pass,$email) = split(/\|/,$i); if (uc($email) eq uc($string)) { open (MAIL, "| $sendmail -t") || die "I can't open sendmail\n"; print MAIL "To: $email\n"; print MAIL "From: $myemail\n"; print MAIL "Subject: The passwords\n"; print MAIL "\n"; print MAIL "Here are the passwords you asked for:\n"; print MAIL "\n"; print MAIL "Field 1: $user\n"; print MAIL "Field 2: $pass\n"; print MAIL "Field 3: $email\n"; print MAIL "\n";