go ahead... be a heretic | |
PerlMonks |
Re: Simple FTPby Cirollo (Friar) |
on Jul 11, 2001 at 18:27 UTC ( [id://95694]=note: print w/replies, xml ) | Need Help?? |
You don't want to be using local here; you should use my to declare your variables instead.
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 Section
Cool Uses for Perl
|
|