The <> operation (thus, readline($socket)) waits for the contents of $/ variable to appear on the socket before returning. Are you sure that remote host sends data containing it after someone connects to it?
Try setting your socket into non-blocking mode by adding Blocking => 0 to the constructor arguments. More useful information on non-blocking I/O can be found at http://www.kegel.com/dkftpbench/nonblocking.html and in perlfaq8.
In reply to Re: Script hangs when assigning variable to socket handle
by aitap
in thread Script hangs when assigning variable to socket handle
by cspctec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |