Are you trying to use a hash??
---
@myArray = qw(one two three four);
&new;
sub new {
$self{'Next'} = \@myArray;
}
print "Element 0 is $self{'Next'}->[0]\n";
---
You can't specifiy the size of the array, it's dynamic. Just enter your data
into the array and it will change size accordingly. If you want a scalar
reference to an array use this
@myArray = qw(one two three four);
$reference = \@myArray;
print @{$reference}[0];
HTH
John
-----Original Message-----
From: Nick Transier [mailto:[EMAIL PROTECTED]]
Sent: 20 June 2001 17:22
To: [EMAIL PROTECTED]
Subject: $self def
Given this is my definition for self in some new constructor:
sub new {
$self {
Next => @[Max_Level],
}
}
First, is this the proper way to have Next be a reference to an annonymous
array of size Max_Level?
More importantly, how do you reference the elements in the array referenced
by Next?
Thanks,
-Nick
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
--------------------------Confidentiality--------------------------.
This E-mail is confidential. It should not be read, copied, disclosed or
used by any person other than the intended recipient. Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful. If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.