On Sunday, May 12, 2002, at 06:45 , Moked, Roee wrote:

> Hi,
> How do I access a field in an array that is a field of a hash?
> ex:
> %hash
> $hash[1] =@array1
> $hash[2] =@array2
> .....
>
> no I want to change $array2[6] via the hash.

may I recommend that you start with trying say:

        $hash{1} = [@array1];

or
        my %hash = (
                1 => [@array1],
                2 => [@array2],
        );

then to get to the 6th entry in that you would use say

        my $six = @{$hash{1}}[6];

since by doing the assignment of [@array1] - you are
stashing away something that can be dereferenced as
an array.


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to