how to assing array variable as a hash? : @array=(10,45,20);


@sum=($array[0]+$array[1]+$array[2]);


%hash;

$hash{$array[0]}{$array[2]}=$sum[0]

I'm trying to print this hash.As key1 is the  array[0] ,key2 is array[1] and $sum[0] is the value.But hash couldn't work.What I'm doing wrong?  