Chapter 12. COMMUNICATING OVER A NETWORK

Perl has always had strong networking communication support built in through socket(), bind(), and other functions. Since Perl 5 we've also been able to use the IO::Socket module for an easier way of creating a socket object which automatically connects to a remote machines or sets up a socket suitable for providing a service through which we can communicate with another machine. In all cases, what we end up with is a filehandle that we can read and write to using the usual read(), sysread() and print() functions.

For communicating with Internet services we can to use one of the various modules available on CPAN – Graham Barr's libnet module, for example, provides connectivity with FTP, SMTP, NNTP, and ...

Get Perl To Python Migration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.