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.