in reply to This is really a Perl BUG with my?! Need some advice...
I don't think this is a bug at all.
When $n/3 does not contain a dot, that statement is not executed at all, thus preserving the value of $local from the previous iteration.
In Section
Seekers of Perl Wisdom