in reply to Pushing anon hash on to HoA structure giving Use of uninitialized value in hash element error using warnings

I'm assuming this statement is where the error is occurring, since it's the only push() in your code.

push( @{$bros->{$year}}, $info);

There are three variables there, and Perl is telling you that one of them is undefined. You should be able to tell which one by looking at the code, but if not some judiciously placed print() statements will help. (Hint: it's the one that only gets initialized in one branch of a conditional.)

  • Comment on Re: Pushing anon hash on to HoA structure giving Use of uninitialized value in hash element error using warnings
  • Download Code