I think you've got a bug there; are you sure that the object contains the tasks after your push?
I think the line @{ $self->{_tasks} } = @taskArray; takes care of that?
Anyway, your version is indeed the shorter & more efficient one.
hatz, you may want to look at perlreftut and perlref.
In reply to Re^2: Class array, push a new element
by Anonymous Monk
in thread Class array, push a new element
by hatz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |