www.perl.com
Perl Programming
CGI.pm
  • Perl module for CGI programming
    • use CGI; for OO interface
    • use CGI qw( :standard ); for functional interface with standard subroutines
    • perldoc CGI for complete description
    • Beware that CGI.pm on Athena is old

        use CGI qw(:standard);
        print header(),
              start_html('A Simple Example'),
              h1('A Simple Example'),
              p("Hello, World"),
              end_html();
      

        Content-Type: text/html; charset=ISO-8859-1

        <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE html
                PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
                "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
        <head><title>A Simple Example</title>
        </head>
        <body><h1>A Simple Example</h1><p>Hello, World</p></body>
        </html>
      
Previous http://www.mit.edu/iap/perl/