This doesn't work. It prevents the error message, but what it actually does is
use threads; use threads::shared;; use IO::Socket::INET;; $sock = IO::Socket::INET->new( 'localhost:12345' );; $ref = &share( [ $sock ] );; print $ref;; ARRAY(0x2253c8) print $#$ref;; -1 #### The anonymous array is EMPTY!
In reply to Re^3: How to share sockets between threads
by BrowserUk
in thread How to share sockets between threads
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |