repeat.cgi
#!/usr/bin/perl if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); if ($ENV{'QUERY_STRING'}) { @getpairs =split(/&/, $ENV{'QUERY_STRING'}); push(@pairs,@getpairs); } } else { print "Content-type: text/html\n\n"; print "<P>Use Post or Get"; } $base = $formdata{'base'}; $school = $formdata{'school'}; $twice = $base x 2; $cheer = $base x 2 . $school; $number = $formdata{'number'}; $repeat = $formdata{'repeat'}; $repeat_number = $number x $repeat; print "Content-type: text/html\n\n"; print "<FONT SIZE=+2>The cheer is <B>$cheer</B>."; print "<P>And the number, $number, repeated $repeat times is <B>$repeat_number<B></FONT>";
Last updated: 05/22/2025 06:17:01