in reply to array in hash in hash access

Just adding a few things to the replies by davido and grantm:

  • In addition to perldsc, you might also want to look at perlref and perlreftut (since what you're really doing here is dereferencing anonymous data structures
  • When using complex data structures, sometimes it helps to think about them in English rather than in code (granted, in perl this is often nearly the same). A translation of foreach my $element ( @{ $t_type{'a'}{'range'}{'disallowed'} } ) is "for each element in the anonymous array refered to by the hash element $t_type{'a'}{'range'}{'disallowed'}".
  • Similarly, you could get a list of the keys in the anonymous hash refered to by $t_type{'a'}{'chance'} using keys %{ $t_type{'a'}{'chance'} }.
  • HTH

    Update: fixed typo (there is no 'foreach' in English!)(thanks revdiablo!).