in reply to Creating 2 sockets in a script.

Please use code tags to make your code readable, and make sure you are running with
use strict; use warnings;