use CGI;
use CGI qw/:standard/;
use Digest::MD5 qw(md5_hex);


my $query = CGI->new(\&hook,$PREF_logfh);
my $filename = $query->param('uploadname');
($filename,$file_ext) = ($filename =~ /(.*)\.(.+)$/);
my $upload_filehandle	= $query->upload('uploadname');

my $tmpFileName = $query->tmpFileName( $upload_filehandle );
print( $tmpFileName );

#取得MD5

my $ctx = Digest::MD5->new;		
$ctx->addfile( $upload_filehandle );
print( $ctx->hexdigest );


Posted on 2007-04-25 14:52  古代  阅读(665)  评论(0编辑  收藏  举报