in reply to Re^2: Global symbol requires explicit package name
in thread Global symbol requires explicit package name
And BTW, dont call it as &make_shared_array(): that is very "old" style and it has side-effects you probably do not know about.
Deleting use strict is not a good idea. It pointed an error out to you. Removing use strict does not make the error go away, only the error message, the error being that @state is not the shared variable you think it is, a very fundamental error.
Update: A rather handy trick you can try is using Data::Dumper to inspect your arrays and hashes. Then you do not have to write all these for loops with nothing but a print inside.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics
|
|---|