thanks, i really tried a lot of stuff.. but i didn't figure out the @{} operator... :)
It worked! ;)
Thanks,
Pedro
On 25 de jan de 2004, at 15:55, drieux wrote:
On Jan 25, 2004, at 7:47 AM, Pedro Miguel Freire Custódio wrote: [..][..]
sub _init {
my $self = shift;
$self->{OBJECT} = ("xpto1","xpto2"); ---> THE PROBLEM! It only stores xpto2
if (@_) {
my %extra = @_;
@$self{keys %extra} = values %extra;
}
}
And when i try to use this method:
sub object { my $self = shift; return $self->{OBJECT} unless @_; my @list = $self->{OBJECT};
have we thought about doing that as an array ref?
$self->{OBJECT} = ["xpto1","xpto2"]; ... my @list = @{$self->{OBJECT}};
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>