Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Simple FTP

by Cirollo (Friar)
on Jul 11, 2001 at 18:27 UTC ( #95694=note: print w/ replies, xml ) Need Help??


in reply to Simple FTP

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:


Comment on Re: Simple FTP
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95694]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-11-27 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls