通过本文主要向大家介绍了cgi perl,perl高级编程,perl语言编程实例,perl语言编程,perl编程等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
一 CGI.pm中的方法(routines)调用
1. CGI.pm实现了两种使用方法,分别是面向对象的方式和传统的perlmodule方法的方式。
面向对象的方式:
传统的module方法的方式:
其中-type,-status,-expires,-cookie为可以设别的参数,其他的命名参数都被转化为html header属性。
-expires的值可以为:
+30s 30 seconds from now
+10m ten minutes from now
+1h one hour from now
-1d yesterday (i.e. "ASAP!")
now immediately
+3M in three months
+10y in ten years time
Thursday, 25-Apr-1999 00:40:33 GMT at the indicated time & date
2. start_html 创建页面的顶层元素<html><header</header><body>
例如:
或者:
代码如下

