package Mods::mod1;

my $nr = 0;

#this is subroutine that is executed to handle request.
sub doit
{    
    ++$nr;
    print "Content-type: text/html\n\n";
    print "Hi from Mods::mod1 - this is request number $nr for this process<br>";
    use CGI;print 'foo is ' . CGI::param('foo') . "<br\%ENV follows:<br>";
    map { my $v = $ENV{$_}; s/([<>&])/sprintf '&#%d;',ord($1)/eg; 
	    print "<b>$_</b> is $v<br>\n" } sort keys %ENV;    
    1;
}

1;
