in reply to Error "undefined value as a symbol reference "

I don't have the time to try your code, but if line 16 is the one calling binmode $server; I bet it has to do with the fact that you don't check $server validity after the call to IO::Socket::INET->new.

As a general rule, always check that things dinamically set up are ok before using them.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.