|
#!/usr/bin/perl $getid = <STDIN>; $getid =~ tr/+/ /; $getid =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; $getid =~ s/~!/~!/g; @getrec = split (/&/,$getid); ($n,$id) = split (/=/,$getrec[0]); ($n,$passwd) = split (/=/,$getrec[1]); print "Content-type:text/html\n\n"; $filename = 'data.txt'; open(myfile,">>$filename"); print myfile "$id,$passwd,\n"; close(myfile); print "Add new record ok"; |