in reply to Modification of non-creatable hash value attempted

There are CPAN modules that make hashes non-modifiable, like Readonly.

Maybe $u is such a read-only hash? Or a tied hash that doesn't support modification?

It would help if you could provide a small sample that lets us reproduce the problem.