小编use*_*877的帖子

面向对象的Perl脚本

sub new
{
    my $class = shift; #off the first element
    my $self = { };
    bless $self, $class;
    return $self;
}
Run Code Online (Sandbox Code Playgroud)

谁能解释一下呢?以下三行代码有什么用?

my $self = { };
    bless $self, $class;
    return $self;
Run Code Online (Sandbox Code Playgroud)

oop perl

0
推荐指数
1
解决办法
83
查看次数

标签 统计

oop ×1

perl ×1