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
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
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
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
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
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