作者已经解释了
in the documentation.
Most CGI.pm routines accept several
arguments,sometimes as many as 20
optional ones! To simplify this
interface,all routines use a named
argument calling style that looks like
this:
print
$q->header(-type=>’image/gif’,-expires=>’+3d’);
Each argument name is preceded by a
dash. Neither case nor order matters
in the argument list. -type,-Type,
and -TYPE are all acceptable. In
fact,only the first argument needs to
begin with a dash. If a dash is
present in the first argument,CGI.pm
assumes dashes for the subsequent
ones.
Several routines are commonly called
with just one argument. In the case
of these routines you can provide the
single argument without an argument
name. header() happens to be one of
these routines. In this case,the
single argument is the document type.
print $q->header(‘text/html’);