more useful options | |
PerlMonks |
Putting contents of an array into Object propertyby fmogavero (Monk) |
on Sep 28, 2001 at 17:45 UTC ( [id://115391]=perlquestion: print w/replies, xml ) | Need Help?? |
fmogavero has asked for the wisdom of the Perl Monks concerning the following question:
Brethern and cistern, I have an array @temparray that I would like to put into an object's property $self->clientorgunit. The property is defined thus: $self->{clientorgunit} = [];. $self->clientorgunit(@temparray); puts only the first element of the array into $self->clientorgunit. $self->{clientorgunit} = @temparray; puts only the scalar value of @temparray into $self->clientorgunit. What am I missing here?
Thanks,
Back to
Seekers of Perl Wisdom
|
|