You are saying I cannot set the size of an array? I understand that you do
not have to, but I need to in this case so that my iteration loops work
correctly.
>From: John Edwards <[EMAIL PROTECTED]>
>To: 'Nick Transier' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: $self def
>Date: Wed, 20 Jun 2001 17:34:51 +0100
>
>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.
>
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com