in reply to Splitting file data in to anonymous hashes

Your problem is actually very simple to solve, and you have the correct solution above.

Perl evaluates $ytd{$key}->{oct01} before it evaluates $key and assigns $key and $ytd{$key}->{oct01} values.

You need that $temp variable.