#!perllocation
#
# NB: this file belongs in the directory configured as ScriptAlias /jg/
#     on this HTTPD server.  (typically htmlbin or optbin)
#     Generated from a template by a makefile in the source tree
#  
require "cgi-lib.pl";

do 'build-opt-env.pl';
$thisdir = "$topdir"."/"."$rundir";

MAIN:
{

  # Read in all the variables set by the form
  &ReadParse(*input);
  $newparams="";
  foreach (split("\0", $input{'var'})) {
     $newparams.="$_".",";
  }
  chop($newparams);
  if ($ENV{'QUERY_STRING'}) {
    $ENV{'QUERY_STRING'} .= ","."$newparams";
  } else {
    $ENV{'QUERY_STRING'} = "$newparams";
  }
  system("$thisdir/selopt");
}

