in reply to array as attributes in OO perl
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.
|
|---|