编程中的出错信息
返回
Argument "P0" isn't numeric in multiplication (*) at ./pro/mscenq1.pl line 761, line 12., referer:
Argument "P2" isn't numeric in multiplication (*) at ./pro/mscenq1.pl line 762, line 12., referer:
Use of uninitialized value in multiplication (*) at ./pro/mscenq1.pl line 761, line 12., referer:
Use of uninitialized value in multiplication (*) at ./pro/mscenq1.pl line 762, line 12., referer:
Use of uninitialized value in concatenation (.) or string at ./pro/mscenq1.pl line 765, line 12.,
Use of uninitialized value in concatenation (.) or string at ./pro/mscenq1.pl line 769, line 12.,
Use of uninitialized value in multiplication (*) at ./pro/mscenq1.pl line 761, line 12., referer:
Use of uninitialized value in multiplication (*) at ./pro/mscenq1.pl line 762, line 12., referer:
-----------------------------------------------------------------------------------
Subroutine copy_enq1_enq2 redefined at ./pro/mscqtn_input.pl line 398.\r, referer: http://127.0.0.1/
Subroutine copy_enq1_enq22 redefined at ./pro/mscqtn_input.pl line 424.\r, referer: http://127.0.0.1/
File does not exist: C:/www/htdocs/favicon.ico
File does not exist: C:/www/htdocs/favicon.ico
Subroutine copy_enq1_enq2 redefined at ./pro/mscqtn_input.pl line 398.\r, referer: http://localhost/cgi-bin/msc_start.cgi
Subroutine copy_enq1_enq22 redefined at ./pro/mscqtn_input.pl line 424.\r, referer: http://localhost/cgi-bin/msc_start.cgi
-----------------------------------------------------------------------------------
修改项目:
删除mscenq2.pl的
copy_enq1_enq2和copy_enq1_enq22
msc.pm
#require "./pro/mscquo1_one.pl";
#require "./pro/mscorder2.pl";
#require "./pro/mscinv1.pl";
#require "./pro/mscpacking1.pl";
#require "./pro/mscinv2.pl";
-----------------------------------------------------------------------------------
malformed header from script. Bad header=\xef\xbb\xbf: m_start.pl, referer: http://127.0.0.1/iis_cgi.htm
$t{template} = HTML::Template->new(filename => "m_start.htm");
$t{template}->param(LOOP => \@loop);
print $t{template}->output;
追加了如下一行解决了问题。
print "Content-type: text/html; charset=UTF-8\n\n";
$t{template} = HTML::Template->new(filename => "m_start.htm");
$t{template}->param(LOOP => \@loop);
print "Content-type: text/html; charset=UTF-8\n\n";
print $t{template}->output;
---------------------------------------------------------------
[Wed Mar 19 16:54:59 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
my %row = (
NO => $t{NO}
);
改为==>
%row = ();
%row = (
NO => $t{NO}
);
最后改为==>
$row_ref = (); # 这个初始化非常重要!
$$row_ref{id} = $rec[0];
$$row_ref{ourref} = $rec[1];
push(@loop, $row_ref);
[Wed Mar 19 16:54:59 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
$t{ourref} = $self->dbh->selectrow_array("SELECT ourref FROM enq1 where id = $rec[2]");
==>在做新表时,自动往enq2里填写最新的ourref
[Wed Mar 19 16:54:59 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:02 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:02 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_header.pl line 26, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:02 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_header.pl line 26, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:02 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_header.pl line 54, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:02 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_header.pl line 54, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:08 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:08 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2.pl line 32, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:08 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2.pl line 32, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:08 2008] [error] [client 127.0.0.1] Use of uninitialized value in split at ./pro/mscenq2.pl line 67, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:08 2008] [error] [client 127.0.0.1] Use of uninitialized value in numeric eq (==) at ./pro/mscenq2.pl line 146, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:13 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:17 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:17 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:55:17 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
问题1:数字排列按数字,文字排列按文字
# @union = sort {$a<=>$b} keys %count;
@union = sort keys %count;
------------------------------------
[Mon Mar 03 12:21:46 2008] [error] [client 127.0.0.1] Argument "16A" isn't numeric in sort at ./pro/mscenq1_parts3.pl line 89, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Mon Mar 03 12:21:46 2008] [error] [client 127.0.0.1] Argument "16B" isn't numeric in sort at ./pro/mscenq1_parts3.pl line 89, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Mon Mar 03 12:21:46 2008] [error] [client 127.0.0.1] Argument "SB254511" isn't numeric in sort at ./pro/mscenq1_parts3.pl line 89, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
-------------------------------------------
[Mon Mar 03 13:46:56 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: Unknown column '16A' in 'where clause' at ./pro/mscenq1_parts3.pl line 152, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
mysql> select id from a000003 where code = 16A;
ERROR 1054 (42S22): Unknown column '16A' in 'where clause'
mysql> select id from a000003 where code = "16A";
+----+
| id |
+----+
| 12 |
+----+
[Wed Mar 19 16:48:24 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscenq2_select.pl line 162.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:24 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:24 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:24 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_start.pl line 31, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscenq2_select.pl line 162.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_header.pl line 26, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_header.pl line 26, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2_header.pl line 53, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:27 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2_header.pl line 53, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscenq2_select.pl line 162.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] "my" variable %row masks earlier declaration in same scope at ./pro/mscshowparts30.pl line 40.\r, referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] Use of uninitialized value in concatenation (.) or string at ./pro/mscenq2.pl line 32, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] DBD::mysql::db selectrow_array failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./pro/mscenq2.pl line 32, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] Use of uninitialized value in split at ./pro/mscenq2.pl line 67, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
[Wed Mar 19 16:48:38 2008] [error] [client 127.0.0.1] Use of uninitialized value in numeric eq (==) at ./pro/mscenq2.pl line 146, line 11., referer: http://localhost/cgi-bin/msc_start.cgi
返回