in reply to Re: Question about dereferencing multi-dimensional array/hash
in thread Question about dereferencing multi-dimensional array/hash

Hello, please refer above for the corrected version. Regarding the other thing that you mentioned, nope, I think I need  $x+1, that is because when I reach the last item in the array, I want to exit the inner 'for loop', if not  my ($next_key, $next_val) = each(%{$main_hash{$k}[$x+1]}); would give me 'Uninitialized values' errors.