in reply to hashref scope

Since I don't know what you're trying to do, there's no sense attempting to decipher the data structure. However, it looks like the data structure is created (autovivified) inside the for loop and goes out of scope at the end. First, try use strict; and fix all the errors and warnings that come up. Pay attention to the uninitialized value warnings. Then use Data::Dumper as others suggested.