#! /usr/bin/perl
print"Content-Type:text/html\n\n";
read (STDIN,$buffer,$ENV{'CONTENT_LENGTH'});#as i'm using the #post method in my form
@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;
$FORM{$name}=$value;
}
#more part of program
#checking password
if ($FORM{'password'}=~ /^\w+$/){sucess();}else{error();}
####
if (ypcat passwd |grep $FORM('username'}){check();}else {error();}