or download this
man IO::Socket(3pm)
...
timeout([VAL])
Set or get the timeout value associated with this socket. If called
+without any arguments then the current setting is returned. If called
+ with an argument the current setting is changed and the previous val
+ue returned.