in reply to Printing of Array Hash is Missing Elements

If you applied the earlier tips, and the bug's not yet obvious, consider warn's and the perl debugger:

Beside the time honored practice of liberally sprinkling warns() to check for "assertions" like @keys=sort keys %buildings; $#keys+1==40 or warn "NOT forty: $#keys+1\n" you shouldn't forget the possibilities offered by the perl debugger, esp. when you set the breakpoint near suspected code.

Updated to include Dumper: also consider use Data::Dumper; ...; warn Dumper(...); I actually prefer this over interactive debugger use.