Besides the CookBook, mentioned above, I would get a copy
of Network Programming with Perl. It provides many examples of writting a chat client. Even if you don't use one of them, you will get a good understanding of different methods for writting one. i.e. using Threads, IO::Poll, Pre-Forking sockets.... etc.