#!/usr/bin/perl

use lib '/home/max/berezin/bin';
use CGI qw(:standard);

#***************************************************************
# Main
#***************************************************************
{
  if ($ENV{'REQUEST_METHOD'} eq "GET")
    { $in = $ENV{'QUERY_STRING'}; } 

  elsif ($ENV{'REQUEST_METHOD'} eq "POST")
    { read(STDIN,$in,$ENV{'CONTENT_LENGTH'}); }

  # split returned data at & or ;
  @in = split(/[&;]/,$in); 

  # begin building web page
  print "Content-Type: text/html\r\n\r\n";
  print "<html> <head>\n";
  print "<title>Grade Entry</title>\n";
  print "</head>\n";  print "<body>\n";
  print "<br>GREETINGS and salutations";
  print "<br>$in";

  print "</body> </html>\n";
    #  end of web page generation
}

1;
