Hey Lachy,
Are you just seeing the "Accepting connection." on STDOUT? Going over the code quickly it looks like you have
$i set to 1 here:
then increment it to 2. When trying to access to the connection again at that index here:
you are trying to access it with 2 when you should be using 1, no?. Other than that, I don't see anythign glaring wrong with it. Have you tried using
strict and
warnings?
~Charlie