Please help. Here is my problem.
I wrote a program, uses threads::shared to share 2 variables ($x, %y). I access them in my subroutines called thread_xy. When I have the main program and the subroutine inside a single file, everything is Fine.
Now I put thread_xy into a Package called: myPackage.pm. It no longer work. I tried to declare the variable inside myPackage.pm, passing the variable within the thread_xy(...), and tried to use use "qw" etc. None worked: the shared variables I modified inside thread_xy(...) is not passed back to my main program.
How I can declare the shared variables correctly between the main program and a subroutine when I put the subroutine in a Package (separated from my main program)?