privet
#html forma
#script
#! /usr/bin/perl
if ($ENV{\'QUERY_STRING\'}) {$namevalues = $ENV{\'QUERY_STRING\'};}
else {read(STDIN, $namevalues, $ENV{\'CONTENT_LENGTH\'});}
@pairs = split(/&/, $namevalues);
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;
$value =~ s/<([^>]|
)*>//g;
$form{$name} = $value;}
$tvoe_chislo = "5";
$chislo = $form{\'chislo\'};
#esli user vvel 5
if($chislo eq "$tvoe_chislo"){print "Location:
http://www.yahoo.com"; }
#esli user vvel lyuboe drugoe
else {print "Location:
http://www.ya.ru";}
bye