then look up the error number to find what the problem is
Would using $^E work?
In reply to Re^2: Unknown Socket error (0+$!) by ikegami in thread Unknown Socket error by b-unit