首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(1) | 引用(0) | 阅读1670次
perl4编程出错信息

perl 出错信息
刚开始接触PERL,不怎么熟悉语法,经常出错,不过出错信息实在太不友好了

#!O:/php/perl/bin/Perl.exe
print "Content-type:text/html\n\n";
print "<center><h2>Hello World</h2></center>;
#这里少了一个“ 号
exit; www.shengfang.org

Internal Server Error www.shengfang.org
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, www.shengfang.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------------------------------------------------

Apache/2.0.54 (Win32) PHP/4.3.10 Server at 127.0.0.1 Port 80

这根本都看不出什么东西 www.shengfang.org
找了一些资料,原来这样就可以了

加入: www.shengfang.org
use CGI::Carp qw(fatalsToBrowser);

Software error:
syntax error at O:/php/Apache Group/Apache2/cgi-bin/sf.pl line 8, near "print "Content"
syntax error at O:/php/Apache Group/Apache2/cgi-bin/sf.pl line 8, near "gb2312\"
Can't find string terminator '"' anywhere before EOF at O:/php/Apache Group/Apache2/cgi-bin/sf.pl line 26.

For help, please send mail to the webmaster (www.shengfang.org), giving this error message and the time and date of the error.

B<CGI::Carp> - CGI routines for writing to the HTTPD error log
CGI::Carp - CGI routines for writing to the HTTPD (or other) error log

--------------------------------------------------------------------------------

SYNOPSIS
    use CGI::Carp;
    croak "We're outta here!";
    confess "It was my fault: $!";
    carp "It was your fault!";  
    warn "I'm confused";
    die  "I'm dying.\n";
    use CGI::Carp qw(cluck);
    cluck "I wouldn't do that if I were you";
    use CGI::Carp qw(fatalsToBrowser);
    die "Fatal error messages are now sent to browser";


--------------------------------------------------------------------------------

DESCRIPTION
CGI scripts have a nasty habit of leaving warning messages in the error logs that are neither time stamped nor fully identified. Tracking down the script that caused the error is a pain. This fixes that. Replace the usual

    use Carp;
with

    use CGI::Carp
And the standard warn(), die (), croak(), confess() and carp() calls will automagically be replaced with functions that write out nicely time-stamped messages to the HTTP server error log.

For example:

   [Fri Nov 17 21:40:43 1995] test.pl: I'm confused at test.pl line 3.
   [Fri Nov 17 21:40:43 1995] test.pl: Got an error message: Permission denied.
   [Fri Nov 17 21:40:43 1995] test.pl: I'm dying.
AUTHORS
Copyright 1995-2002, Lincoln D. Stein. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Address bug reports and comments to: lstein at cshl dot org


字体:

Permanant URI永久地址 http://www.shengfang.org/blog/p/perl4errlog.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1126600736

2005年9月13日16:38星期二  [Dev开发] 追踪此文的RSS
路过在 2007年12月16日00:11星期日 评论:

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告
Fire and Motion!

统计信息
[Yippee]||[统计]||日志:1790
在线: 10||用户: 2562 [列表]
今日:2090||到访:2671589
Rss:838429||评论:1584

最新日志

最新评论

友情链接

日历

最新引用

搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8