in reply to This is really a Perl BUG with my?! Need some advice...
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.