Re: array as an class attribute

2001-09-08 Thread Brett W. McCoy
On Sat, 8 Sep 2001, Gustavo A. Baratto wrote: > Thanks for the help. I wasn't initializing the $self->{ARRAY} with []. > But later in the code I need to do something like this: > > @self->{ARRAY} = @another_array; # of course this is giving me an error. You still need an array reference: $self

Re: array as an class attribute

2001-09-08 Thread Gustavo A. Baratto
ohhh boy... It worked greatly. I have a lng way til I get all those tricks. Thank you very much. "Jeff 'Japhy/Marillion' Pinyan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On

Re: array as an class attribute

2001-09-08 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 8, Gustavo A. Baratto said: >Thanks for the help. I wasn't initializing the $self->{ARRAY} with []. >But later in the code I need to do something like this: > >@self->{ARRAY} = @another_array; # of course this is giving me an error. @{ $self->{ARRAY } = @another_array; or $self->{A

Re: array as an class attribute

2001-09-08 Thread Gustavo A. Baratto
Thanks for the help. I wasn't initializing the $self->{ARRAY} with []. But later in the code I need to do something like this: @self->{ARRAY} = @another_array; # of course this is giving me an error. Do I have to do: for ($i=0;$i<$#another_array;$i++) { $self->{ARRAY}[$i] = $another_arra

Re: array as an class attribute

2001-09-08 Thread Brett W. McCoy
On Sat, 8 Sep 2001, Gustavo A. Baratto wrote: > How can I have an array in a class attribute? > > In my constuctor this is not working: (I need $self->{ARRAY} to be an array) > > > sub new > { > my $class = shift; > my $self = { }; > $self->{IFCONFIG} = "/etc/ifconfig.temp"; > $se

array as an class attribute

2001-09-08 Thread Gustavo A. Baratto
How can I have an array in a class attribute? In my constuctor this is not working: (I need $self->{ARRAY} to be an array) sub new { my $class = shift; my $self = { }; $self->{IFCONFIG} = "/etc/ifconfig.temp"; $self->{NEWIP} = "/home2/nas3/nas/.newip.temp"; $self->{IP} = und