<%@ LANGUAGE = PerlScript%> Request Object
ActiveState PerlScript

Web Forms Example

<% my($name) = $Request->Form('Yourname')->Item(); $name = $Server->HTMLEncode($name); %> <% if($name eq 'Enter Your name here') { $Response->Write("Please type your name in the box below and then press the button"); } else { $Response->Write("Hello $name"); } %>


<% $url = $Request->ServerVariables('PATH_INFO')->item; $_ = $Request->ServerVariables('PATH_TRANSLATED')->item; s/[\/\\](\w*\.asp\Z)//m; $params = 'filename='."$1".'&URL='."$url"; $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg; %> Return

view the source