#!/usr/bin/perl
use CGI;

sub doit
{    
    ++$nr;
    print "Content-type: text/html\n\n";
    print "Hi from simple CGI script<p>";
    use CGI;print 'foo is ' . CGI::param('foo') . "<p>ENV follows<br>"; 
    map { my $v = $ENV{$_}; s/([<>&])/sprintf '&#%d;',ord($1)/eg; 
	    print "<b>$_</b> is $v<br>\n" } sort keys %ENV;    
    1;
}

doit();

1;
