Here's a trick that will save a level in your HoHoA. Use slurp mode to
read the whole contents of each file into a string, and save the whole string in the HoH. When you get to the
point of needing to interate over the lines, split the string on
newlines.
sub readFile {
my $filename = shift;
my $fh = new FileHandle("<" . $filename);
local $/ = undef; # slurp mode
my $data = <$fh>;
$fh->close;
return $data;
}