Use use strict;! There's a major error in init.
As for the problem with getTheFirst, since it would be
$array[0]->getDNA()
if you were dealing with an array instead of a reference to an array, then it's
${$array_ref}[0]->getDNA()
when using an array ref. It can also be written as
$array_ref->[0]->getDNA()
So all together, we get
$this->{individual}->[0]->getDNA()</c>
See
In reply to Re: arrays of object in OO perl
by ikegami
in thread arrays of object in OO perl
by IL_MARO
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |