in reply to Re^2: Threaded Sockets, access from outside thread?
in thread Threaded Sockets, access from outside thread?

I think he means
my $controlSocket;
should be
my $controlSocket :shared;
Variables aren't automatically shared.

Replies are listed 'Best First'.
Re^4: Threaded Sockets, access from outside thread?
by ecuguru (Monk) on Jun 16, 2006 at 06:10 UTC
    Thanks
    I tried that before, but ended up getting:
    thread failed to start: Invalid value for shared scalar at server_clie +nt_thread.pl line 41. thread failed to start: Invalid value for shared scalar at server_clie +nt_thread.pl line 59. for lines: $controlSocket = IO::Socket::INET->new("localhost:1024") or pr +int "Can`t open feed\n"; and $server = IO::Socket::INET->new( Proto => 'tcp',
    If the shared call is right, should I be declaring the socket calls differently?