views:

154

answers:

2

What is the most updated book on programming TCP/IP sockets with Perl?

+9  A: 

Socket programming hasn't changed much in the past 30 years or so. Network Programming with Perl is pretty comprehensive, though it was published back in the stone age of AD 2000.

Perl's raw socket interface is basically a thin wrapper around the C socket API, so if you're interested in doing raw socket programming, the C API reference will probably be the most useful. But Perl has a number of higher-level abstractions that make things easier, depending on what you're trying to do. Examples are IO::Socket for doing socket stuff in an OO fashion, LWP for many application-level protocols, incuding HTTP and FTP, various Net::* modules for protocols like SMTP, DNS, NNTP, etc., and many others.

If you update your post to be more specific about what you're trying to accomplish, you'll probably get a more useful answer.

friedo
I usually look at a book written by Stevens (there are several), and translate it to Perl (which looks almost like the C code).
brian d foy
+3  A: 

You probably won't need a whole book for this.

As others have suggested, unless you really need raw socket access, you can find many modules on CPAN for established protocols.

If you must use (or want to learn about) socket programming, check out Beej's Guide, mutatis mutandis to get from C to Perl. Don't sweat the API details, all you need are the basic concepts. Read perlipc too, it will help with switching the C to Perl and it has many examples.

Don't worry too much about the bizarreness of the socket and select APIs, just use IO::Socket and IO::Select to manage your IO. Use IO::Handle methods to interact with your handles. Perl's core IO modules are your friends.

daotoad