shared variablrd and "require" (or "do")

[email protected] (kristoff bonne) Tue, 25 Jul 2006 13:57:07 +0200
Newsgroups perl.ithreads
Message-ID <[email protected]>
Gegroet,


Another small question for which I do not find a solution:

To keep my programs a bit managable, I had the habit to split up my 
program into different files (one main program and a number of related 
subs into one or multiple .pm files).

I "include" these programs into the main program using a "require".


Now, by starting to use threads, I noticed that shared variables are not 
shared anymore when they are found in different files. (so the "require" 
command, is not exactly the same thing as a "include" in C).

I tried using "do" instead of "require" but I have the same result.


Is there a way to split up a program into multiple programs (subs 
running as threads) and still have data shared between the subs 
(threads) found in different files?




Cheerio! Kr. Bonne.