#!/usr/local/bin/perl

require "cgi-lib.pl";

binmode STDIN;
print "General Purpose Environment Checker\n";

&ReadParse(*input);
print "Value of all components extracted from the URL\n";

foreach $key (keys %input) {
    $output=$input{"$key"};
    #print "\noutput=$output\n";
}
$model=$output;
#$inputfile = "../bionome/input".$model; # use this for awt applet
$inputfile = $model;
#print "\nmodel=$model\n";
# 
$addrname = $ENV{REMOTE_ADDR};
$session=$addrname.".".$$;

# Read the input file
if( !open(INPUT, "< $inputfile") ) {
   print "Error in $0 reading in the input file: $!\n";
   return ();
} else {
   @in = <INPUT>;
   close INPUT;
}

print "\nsession=$session\n";
foreach $line (@in) {

   if ($line =~ /\#/) {     # if line contains #'s don't use it
	next;
   }

   else {
	print $line;
   }

} 

