#!/usr/bin/perl # # This script must be located in the directory of /cgi-bin . # # Send Content-type. print "Content-type: text/vnd.wap.wml \n\n"; # Send WML header information. print "\n"; print "\n"; # Retrieve Web argument values. 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; }