when I run the following code, the execution is just hanging there, No response at all.
does any of you can tell me what’s wrong with the sample code?
use strict;
use warnings;
use IO::Select;
use IO::Socket;
my $s = new IO::Socket (
LocalPort => 8889,
Proto => 'tcp',
Listen => 16,
Reuse => 1
);
die "could not create socket $!\n" unless $s;
If you provide arguments to the IO::Socket constructor it demands a Domain argument. Check out the full source here, specifically the configure subroutine which gets called from the constructor if you’ve provided arguments.
Perhaps you’re thinking of IO::Socket::INET?