You actually need a reference to an array. Try
$this->{colour} = [ 'yellow', 'red', 'purple' ]; print "@{$this->{colour}}";
You will, of course, need to adjust where you are using this property to dereference the reference, like I show above.
In reply to Re: array as attributes in OO perl
by gwadej
in thread array as attributes in OO perl
by IL_MARO
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |