I w开发者_如何学编程ant to share data between two threads. How can we do that?
Give some simple program.
perldoc perlthrtut
contains some excellent examples on how to use threads, shared variables, semaphores and queues.
Use threads::shared
. See perldoc.
精彩评论