-- snip --
first content type needs to be a meta tag like this <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> drop the last semicolon
#!/usr/bin/perl print "<html>\n"; print "<head>\n"; print ""; print "</head>\n"; print "<body>\n"; print "<h2>I just wrote my first web page using Perl!</h2>\n"; print "</body>\n"; print "</html>"
Your script will work for generating html but not as a CGI script. Regarding CGI you have to provide a header that hints the browser what kind of data to expect. The first line of output (to standard output) should be (the mime type) Content-Type: text/html in this case. You would have to add print "Content-Type: text/html\n\n"; as the first output line to your script. You can provide other headers to inform the browser of a new location or the content you will send is an image etc. For more info on that have a look at: http://hoohoo.ncsa.uiuc.edu/cgi/out.html -- "Whatever the missing mass of the universe is, I hope it's not cockroaches!" -- Mom