37,744
社区成员
发帖
与我相关
我的任务
分享package HelloWorld;
sub new{
my $class = shift;
my $self = {};
return bless $self, $class;
}
sub hw {
print "Hello, World...\n";
}
package main;
my $hw = HelloWorld->new;
$hw->hw;package HelloWorld;
sub new{
my $class = shift;
my $self = {};
return bless $self, $class;
}
sub hw {
print "Hello, World...\n";
}
1; use HelloWorld;
my $hw = HelloWorld->new;
$hw->hw;
package HelloWorld;
sub new{
my $class = shift;
my $self = {};
return bless $self, $class;
}
sub hw {
print "Hello, World...\n";
}
1;