|< 1 2 >| | 12 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
sub new {
my($package) = shift;
my(@arr) = shift;
my($self) = {};
bless($self, $package);
$self->{array} = @arr;
return($self);
}
1
2
3
4
5
sub new {
my ($class, @array) = @_;
my $self = { array => \@array };
bless $self, $class;
}
$self->{array} = \@array;
my $self=>{array} = \@array;
1
2
Can't modify single ref constructor in scalar assignment at - line 1, near "@array;"
Execution aborted due to compilation errors.
my $self=>{array} = \@array;
my $self, {'array'} = \@array;
1
2
3
4
my $self = { array => \@array };
# oder deine loesung, mit einem strich weniger:
my $self;
$self->{array} = \@array;
|< 1 2 >| | 12 Einträge, 2 Seiten |