perl执行错误!!!!急!!!!



QUOTE:
原帖由 lewphee 于 2008-6-23 01:53 发表
你把插入数据的代码贴上来看看?
FTP.pm line 211的函数是文件时间转换,
你调试一下看看都传进了什么数据了呀

前几天去出差了,我现在把插入数据的主要代码贴上来:
sub get_file {

my ($path,$mode) = @_;
#远程文件的更新时间
my $rtime = $ftp->mdtm($path);
#远程文件的大小
my $rsize = $ftp->size($path);

$mode = (parse_listing($ftp->dir($path)))[2] unless defined $mode;
#dir的用法说明:Get a directory listing of "DIR", or the current directory in long
format.

my ($lsize,$ltime) = stat($path) ? (stat(_))[7,9] : (0,0);
if ( defined($rtime) and defined($rsize) and ($ltime >= $rtime) and ($lsize == $rsize) )
{
write_log("[WARN] Getting file $path: not newer than local copy.\n");
return;
}
write_log("[$$]","开始取$branch_name的文件$path\n");
$ftp->get($path) or (warn $ftp->message,"\n" and return);
write_log("[$$]","取$branch_name的文件$path成功完成\n");
$ftp->delete($path) or (warn $ftp->message,"\n" and return);
write_log("[$$]","$branch_name的文件$path成功清除\n");
chmod $mode,$path if $mode;
system "/usr/bin/uncompress $path";
my ($name,$suffix) = $path =~ m/^(.*)\.(.*).Z$/;
my ($filename) = $path =~ m/^(.*).Z$/;
if ((defined $suffix) && ( $suffix=~/txt/ ))
{
        $name =~ tr/a-z/A-Z/;
        my $contrl_file=$name.".ctl";
        my $time=`date +%Y%m%d%H%M`;
        $time=~s/[\r\n]//;
        #write_log("[$$]","time is $time\n");
        my $bad_file=$branch_no."_".$name."_".$time.".bad";
        my $back_file=$branch_no."_".$name."_".$time.".txt";
        my $log_file=$branch_no."_".$name."_".$time.".log";
        #write_log("[$$]","full bad_file name  $bad_file \n");
        #write_log("[$$]","suffix  $suffix \n");
        #write_log("[$$]","control_file $contrl_file\n");
        write_log("[$$]","开始装载$branch_name的文件$filename\n");
        system "/application/oracle/database/product/10.2.01/db_1/bin/sqlldr nclsis/nclsis
control=$rundir/ctl/$contrl_file bad=$rundir/ctl/$bad_file log=$rundir/log/$log_file erro
rs=10000 direct=true >> $rundir/txt/sqlldr.log";
        my $err_file="$rundir/ctl/$bad_file";
        if(-e $err_file)
        {
        #bad文件是否存在?
        write_log("[$$]","$branch_name的文件$filename装载结束但有错误记录请核查!\n");
        write_log("[$$]","错误记录文件为:$err_file\n");
        system "/bin/mv $filename $rundir/txt/$back_file";
        system "$rundir/load_err.sh $branch_no $name $err_file >>$log_file 2>&1";
        write_log("[$$]","记录文件备份为:$back_file\n");
        }else
        {
        write_log("[$$]","$branch_name的文件$filename装载成功完成!\n");
        system "/bin/mv $filename $rundir/txt/$back_file";
        system "$rundir/load_ok.sh $branch_no $name >>$log_file 2>&1";
        }
}
}

这段程序在32位linux上运行是没有问题的,而移植到64位linux机器上就出现了问题?请教各位高手是不是perl程序都必须运行在32位linux机器上呀?
期待lewphee的解答
抱歉抱歉,现在才看到。

你用$ftp->_MDTM($file),看看返回的日期是什么样的?~