cspctec has asked for the wisdom of the Perl Monks concerning the following question:
my $socket = IO::Socket::INET->new( PeerAddr => '192.168.1.2', PeerPort => '23', Proto => 'tcp' Timeout => 5) or die "Connection failed!"; my $results = <$socket>;
If I assign the results variable to my socket handle, the script will just hang and not output anything.
What would be the most likely reason for it hanging when assign the handle to a variable? Do you think it could just be network lag at on my company intranet? Assigning the socket handle to a variable works fine with other identical devices on the network. I can't figure out why it won't work with this one specific device.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script hangs when assigning variable to socket handle
by aitap (Curate) on Mar 05, 2013 at 19:01 UTC | |
|
Re: Script hangs when assigning variable to socket handle
by kielstirling (Scribe) on Mar 05, 2013 at 20:25 UTC |