#tt.pl
use strict;
use warnings;
use PM::MK1;
my ($zhu,$mark)=(1333,122222);
my $max=MK1->max($zhu,$mark);
print "3:MAX:$max\n";

#我的包文件MK1.pm
package MK1;
sub max{
                shift(@_);
        my($temp1,$temp2)=...@_;
        print "2:$temp1    ***$temp2\n";
        if($temp1 > $temp2){
                return  $temp1;
        }else{
                return $temp2;
        }
}

return 1;

如果我没用“shift(@_);      ”    ,$temp1=MK1;
我不知道为什么?
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复