It is not the "my" that defines the scope of this variable so IMHO it is there only to satisfy "use strict".
I can't think of any other cases in which Perl 5 automatically lexicalizes a named variable without my; I think it's a (useful) consistency.
In reply to Re^3: why need my in a foreach loop?
by chromatic
in thread why need my in a foreach loop?
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |