Thread arrays in objects (11 answers)
Opened by docsnyder at 2006-01-17 11:14

pq
 2006-01-17 11:45
#61974 #61974
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
sub new {
 my ($class, @array) = @_;
 my $self = { array => \@array };
 bless $self, $class;
}

du kannst aber auch prima $self als ein array-objekt anlegen, wenn
du lust hast.\n\n

<!--EDIT|pq|1137491160-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread arrays in objects