local %hash; # no error, if %hash previously declared with my
Actually, if %hash has previously been declared with my, that will generate an error:
Can't localize lexical variable %hash ...
Lexical variables cannot be localized. local() doesn't have a lexical effect, so it wouldn't really make sense if they could.
Comment on Re: Re: 'use strict' Rejecting Local Hash
There is no technical reason why this isn't doable for
the original hash as well. The only reason why it cannot
currently be done is that it is considered a likely cause
of confusion.