- or download this
package Animal;
# constructor
...
@{$this->{DNA}} = @_;
return @{$this->{DNA}};
}
- or download this
package Population;
use Animal;
...
push (@{$this->{individual}}, $empl);
}
}
- or download this
sub getTheFirst{
my $this = shift;
return @{$this->{individual}}[0]->getDNA();
}