in reply to Scope of thread variable

Perl variables aren't shared between threads unless you explicitly share them

Replies are listed 'Best First'.
Re^2: Scope of thread variable
by BrowserUk (Patriarch) on Apr 07, 2010 at 18:53 UTC

    ... but global values assigned to, prior to spawning a thread that also references that same global, will retain a value. But that value may not be usable.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: Scope of thread variable
by mr_p (Scribe) on Apr 07, 2010 at 18:55 UTC
    So, what If I have below statements one declared in the beginning is same as when starting up threads? <code> use SPFtp qw(/^\$/); use SPFtp qw (Connect Login PrepareLsFtpList deleteFile GetFile GetFileSize Logout GetMessage CheckConnection); <code>