i need to come up with a script that when run from the command line, it will bind to a socket, and listen for tcp connections on a certain port.
something like:
### ./connection_listener 5666
i found the following script on the web but when i run it, it complains about "accept" not being available.
perl -MIO::Socket::INET -ne 'BEGIN{$l=IO::Socket::INET->new(
LocalPort=>5666,Proto=>"tcp",Listen=>5,ReuseAddr=>1);
$l=$l->accept}print $l $_'
OS: Linux/SunOS/HPUX/AIX