my creates a lexically scoped variable - one that is only visible in the block in which it was declared.
local creates a temporary local copy of a global variable, and this copy is visible to subroutines you call inside your block (when you use my, the variable is -not- visible to called subs).
Generally, you want to use my rather than local.
See also:
In reply to Re: Simple FTP
by Cirollo
in thread Simple FTP
by rHOnDO
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |