if ($s_ip) { my $ip = $s_ip . ":"; } else { my $ip = "port "; } my $s_socket = IO::Socket::INET->new( Proto=>"udp", LocalAddr=>"$s_ip", LocalPort=>"$s_port" ) or die ("\nCan't setup UDP socket on ".my $ip.":$s_port $!\n");