in reply to Re: difference between my and local
in thread difference between my and local

Yes, to be more accurate: my creates a variable that exists till the end of the innermost enclosing block.
And to be even more accurate, it creates a variable that has a name that exists until the end of the block (or until the name is shadowed by a duplicated identical name). The variable itself might persist beyond the end of the block (as an anonymous variable), if there are still other references to the variable.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.