#/usr/bin/Perl/ use IO::Socket; $connserver = IO::Socket::INET->new(LocalAddr => '194.163.250.10', LocalPort => '9277', Proto => 'tcp', Listen => 1, Reuse => 1); die "Error in connecting server: $!\n" unless $connserver; print "Waiting to connect...\n"; while($client = $connserver->accept()){ print "Connection success, reading the data...\n"; print <$client>; print "Connection is getting closed...\n"; } $connserver->close();