perl - cgi原格式输出

来源:互联网 发布:用js统计网站的访客量 编辑:程序博客网 时间:2024/06/05 23:59

perl 原格式输出, 一个最有用的地方是, 输出网页;只需写网页源码, 不用每行都加一个print.

环境:

perl 5.20.2

apache(httpd2.4.16)

#!i:/Perl64/bin/Perl.exeprint "Content-Type: text/html; charset=utf-8\n";print "CacheControl: no-cache\nPragma: no-cache\nExpires: -1\n\n";print << "EOF";   # 或者 print STDOUT << "EOF"; <html><head>    <title>hello world</title></head><body><h1>perl - CGI原格式输出</h1></body></html>EOF

其中EOF为标号, 可是其他字符串, 只要前面一致


输出:


0 0
原创粉丝点击