#!/usr/bin/perl $CRLF = "\x0d\x0a"; print "Content-type: text/plain$CRLF$CRLF"; foreach $varname (sort keys %ENV) { print "$varname: $ENV{$varname}\n" }
#!/usr/bin/perl $CRLF = "\x0d\x0a"; $browser = $ENV{"HTTP_USER_AGENT"}; $title = "What Browser?"; print "Content-type: text/html$CRLF$CRLF"; print <<BROWSER; <html> <head> <title>$title</title> </head> <body> <h1>$title</h1> <p>You are using $browser. </body> </html> BROWSER