求助!

求助!

求助!
谁可以告诉我下面这段代码错在哪
use HITIR::Abstract;
use Socket;

use DBI;
use CGI;

use LWP;
use HTTP::Request::Common;
use IO::Dir;
use Time::localtime;
use CGI::Cookie;
use File::Path;
use HTTP::File;
use File::Basename;
use FileHandle;
use File::Copy;


my $raw_files = "D:\工作\工作总结\2005\2月28日至3月4日.txt";
my $des_file="C:/Program Files/Apache Group/Apache2/htdocs/personal/resdata";
my $baseName = HTTP::File::upload($raw_files,$des_file);

错误信息:
error with file read: Bad file descriptor at C:/Perl/site/lib/HTTP/File.pm line 59., referer: http://localhost/personal/cg/showArticleSubmit.pl?subject=""
试一下把$raw_f...
试一下把$raw_files中的\换为/看看
试过了,还是不...
试过了,还是不行
下面这段代码错...
下面这段代码错在哪呢

#!/usr/bin/perl
$raw_file="/123.txt";
$basename="123.txt";
open O, ">/usr/$basename" || die $!;
# If the input file is binary, the output file should also be binary
binmode O if (-B $raw_file);
{
my $buffer;
my $bytesread = read($raw_file,$buffer,1024);
# let's exit with an error if read() returned undef
die "error with file read: $!" if !defined($bytesread);
# let's exit with an error if print() did not return true
die "error with print: $!" unless (print O $buffer);
# let's redo the loop if we read > 0 chars on the last read
redo unless !$bytesread;
}
close O;

在AIX上执行报错是:error with file read: A file descriptor does not refer to an open file.

HTTP::File::up...
HTTP::File::upload 是 cpan 上的么?

看一下你的 HTTP::File::upload 用法是否正确. 你是把本地机上的一个文件 upload 到本地机. 为什么?? 为什么不直接 copy ?

前面加的那么多的模块也没见你用.

推荐你把这篇文章好好读一下.
http://wiki.perlchina.org/main/show/brian's%20Guide%20to%20Solving%20Any%20Perl%20Problem