Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Network Programming with Perl 1st Edition

5.0 out of 5 stars 17 customer reviews
ISBN-13: 978-0201615715
ISBN-10: 0201615711
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used On clicking this link, a new layer will be open
$22.14 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$44.81 On clicking this link, a new layer will be open
More Buying Choices
31 New from $32.95 46 Used from $0.15
Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Windows 10 For Dummies Video Training
Get up to speed with Windows 10 with this video training course from For Dummies. Learn more.
$44.81 FREE Shipping. Only 8 left in stock (more on the way). Ships from and sold by Amazon.com. Gift-wrap available.
click to open popover

Frequently Bought Together

  • Network Programming with Perl
  • +
  • Perl and XML
  • +
  • Perl & LWP
Total price: $118.28
Buy the selected items together

Editorial Reviews

Amazon.com Review

"Network programming"--the term had a distinct meaning once, but now it begs the question, "Is there another kind?" That's why Lincoln Stein's Network Programming with Perl is valuable. It shows how one of the world's top Perl authorities brings the language to bear on problems that require communication among computers, showing that you may not have to resort to Java as soon as you may have thought to meet a networking requirement. What's more, Stein doesn't assume you have a lot of Perl expertise. An intermediate-level familiarity with the language should enable you to understand the examples in the book and follow its classic code-and-commentary structure.

Stein presents full, working scripts, calling attention to particularly interesting lines and passages by repeating them in the text. If a program makes use of an unusual or previously undiscussed function (and lots of them do, because one of the author's missions is to introduce the contents of specialized libraries), its syntax and legal parameters will be documented and a concise statement of its behavior provided. The example programs are the best part of this book, though. As the problems get more complicated, it's fun to watch Stein solve them with efficient, attractive code. Unless you're a really experienced professional, you'll be able to study the examples in this book and learn a lot. --David Wall

Topics covered:

  • Perl function libraries and techniques that allow programs to interact with resources over a network
  • IO::Socket library
  • Net::FTP library
  • Net::Telnet library
  • Net::SMTP library
  • Chat problems
  • Internet Message Access Protocol (IMAP) issues
  • Markup-language parsing
  • Internet Protocol (IP) broadcasting and multicasting

From the Inside Flap

The network is everywhere. At the office, machines are wired together into local area networks, and the local networks are interconnected via the Internet. At home, personal computers are either intermittently connected to the Internet, or, increasingly, "always-on" cable and DSL modems. New wireless technologies, such as Bluetooth, promise to vastly expand the network realm, embracing everything from cell phones to kitchen appliances. Such an environment creates tremendous opportunities for innovation. Whole new classes of applications are now predicated on the availability of high-bandwidth, always-on connectivity. Interactive games allow players from around the globe to compete on virtual playing fields and the instant messaging protocols let them broadcast news of their triumphs to their friends. New peer-to-peer systems, such as Napster and Gnutella, allow people to directly exchange MP3 audio files and other types of digital content. The SETI@Home project takes advantage of idle time on the millions of personal computers around the world to search for signs of extraterrestrial life in a vast collection of cosmic noise. The ubiquity of the network allows for more earthbound applications as well. With the right knowledge, you can write a robot that will fetch and summarize prices from competitors' Web sites; a script to page you when a certain stock drops below a specified level; a program to generate daily management reports and send them off via e-mail; a server that centralizes some number-crunching task on a single high-powered machine, or alternatively distributes that task among the multiple nodes of a computer cluster. Whether you are searching for the best price on a futon or for life in a distant galaxy, you'll need to understand how network applications work in order to take full advantage of these opportunities. You'll need a working understanding of the TCP/IP protocol--the common denominator for all Internet-based communications and the most common protocol in use in local area networks as well. You'll need to know how to connect to a remote program, to exchange data with that program, and what to do when something goes wrong. To work with existing applications, such as Web servers, you'll have to understand how the application-level protocols are built on top of TCP/IP, and how to deal with common data exchange formats such as XML and MIME. This book uses the Perl programming language to illustrate how to design and implement practical network applications. Perl is an ideal language for network programming for a number of reasons. First, like the rest of the language, Perl's networking facilities were designed to make the easy things easy. It takes just two lines of code to open a network connection to a server somewhere on the Internet and send it a message. A fully capable Web server can be written in a few dozen lines of code. Second, Perl's open architecture has encouraged many talented programmers to contribute to an ever-expanding library of useful third-party modules. Many of these modules provide powerful interfaces to common network applications. For example, after loading the LWP::Simple module, a single function call allows you to fetch the contents of a remote Web page and store it in a variable. Other third-party modules provide intuitive interfaces to e-mail, FTP, net news, and a variety of network databases. Perl also provides impressive portability. Most of the applications developed in this book will run without modification on UNIX machines, Windows boxes, Macintoshes, VMS systems, and OS/2. However, the most compelling reason to choose Perl for network application development is that it allows you to fully exploit the power of TCP/IP. Perl provides you with full access to the same low-level networking calls that are available to C programs and other natively compiled languages. You can create multicast applications, implement multiplexed servers, and design peer-to-peer systems. Using Perl, you can rapidly prototype new networking applications and develop interfaces to existing ones. Should you ever need to write a networking application in C or Java, you'll be delighted to discover how much of the Perl API carries over into these languages.

This Book's Audience Network Programming with Perl is written for novice and intermediate Perl programmers. I assume you know the basics of Perl programming, including how to write loops, how to construct if-else statements, how to write regular expression pattern matches, the concept of the automatic $_ variable, and the basics of arrays and hashes. You should have access to a Perl interpreter and some experience writing, running, and debugging scripts. Just as important, you should have access to a computer that is connected both to a local area network and to the Internet! Although the recipes in Chapter 10 on setting Perl-based network servers to start automatically when a machine is booted do require superuser (administrative) access, none of the other examples require privileged access to a machine.

This book does take advantage of the object-oriented features in Perl version 5 and higher, but most chapters do not assume a deep knowledge of this system. Chapter 1 addresses all the details you will need as a casual user of Perl objects.

This book is a thorough review of the TCP/IP protocol at the lowest level, or a guide to installing and configuring network hubs, routers, and name servers. Many good books on the mechanics of the TCP/IP protocol and network administration are listed in the references in Appendix D. Roadmap This book is organized into four main parts, Basics, Developing Cients for Common Services, Developing TCP Client/Server Systems, and Advanced Topics. Part I, Basics, introduces the fundamentals of TCP/IP network communications.

Chapters 1 and 2, Networking Basics and Processes, Pipes, and Signals, review Perl's functions and variables for input and output, discuss the exceptions that can occur during I/O operations, and use the piped filehandle as the basis for introducing sockets. These chapters also review Perl's process model, including signals and forking, and introduce Perl's object-oriented extensions. Chapter 3, Introduction to Berkeley Sockets, discusses the basics of Internet networking and describes IP addresses, network ports, and the principles of client/server applications. It then turns to the Berkeley Socket API, which provides the programmer's interface to TCP/IP. Chapters 4 and 5, The TCP Protocol and The IO::Socket API and Simple TCP Applications, show the basics of TCP, the networking protocol that provides reliable stream-oriented communications. These chapters demonstrate how to create client and server applications and then introduce examples that show the power of technique as well as some common roadblocks.

Part II, Developing Clients for Common Services, looks at a collection of the best third-party modules that developers have contributed to the Comprehensive Perl Archive Network (CPAN).

Chapter 6, FTP and Telnet, introduces modules that provide access to the FTP file-sharing service, as well as to the flexible Net::Telnet module which allows you to create clients to access all sorts of network services. E-mail is still the dominant application on the Internet, and Chapter 7, SMTP: Sending Mail, introduces half of the equation. This chapter shows you how to create e-mail messages on the fly, including binary attachments, and send them to their destinations. Chapter 8, POP, IMAP, and NNTP: Processing Mail and Netnews, covers the other half of e-mail, explaining modules that make it possible to receive mail from mail drop systems and process their contents, including binary attachments. Chapter 9, Web Clients, discusses the LWP module, which provides everything you need to talk to Web servers, download and process HTML documents, and parse XML.

Part III, Developing TCP Client/Server Systems--the longest part of the book--discusses the alternatives for designing TCP-based client/server systems. The major example used in these chapters is an interactive psychotherapist server, based on Joseph Weizenbaum's classic Eliza program.

Chapter 10, Forking Servers and the inetd Daemon, covers the common type of TCP server that forks a new process to handle each incoming connection. This chapter also covers the UNIX and Windows inetd daemons, which allow programs not specifically designed for networking to act as servers. Chapter 11, Multithreaded Applications, explains Perl's experimental multithreaded API, and shows how it can greatly simplify the design of TCP clients and servers. Chapters 12 and 13, Multiplexed Operations and Nonblocking I/O, discuss the select() call, which enables an application to process multiple I/O streams concurrently without using multiprocessing or multithreading. Chapter 14, Bulletproofing Servers, discusses techniques for enhancing the reliability and maintainability of network servers. Among the topics are logging, signal handling, and exceptions, as well as the important topic of network security. Chapter 15, Preforking and Prethreading, presents the forki


The latest book club pick from Oprah
"The Underground Railroad" by Colson Whitehead is a magnificent novel chronicling a young slave's adventures as she makes a desperate bid for freedom in the antebellum South. See more

Product Details

  • Paperback: 784 pages
  • Publisher: Addison-Wesley Professional; 1 edition (January 6, 2001)
  • Language: English
  • ISBN-10: 0201615711
  • ISBN-13: 978-0201615715
  • Product Dimensions: 7.3 x 1.7 x 9 inches
  • Shipping Weight: 2.8 pounds (View shipping rates and policies)
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (17 customer reviews)
  • Amazon Best Sellers Rank: #923,607 in Books (See Top 100 in Books)

Customer Reviews

5 star
4 star
3 star
2 star
1 star
See all 17 customer reviews
Share your thoughts with other customers

Top Customer Reviews

By Doralyn J. Merced on January 12, 2001
Format: Paperback
This book, replete with code, is one of the most useful resources I've come across. There aren't just code snippets here -- there are complete and useful programs, with explanations for each line of code. These line-by-line explanations not only make the code crystal clear, but it demonstrates how you can adapt the code to suit your specific need.
It discusses the esoteric topics such as threading, sockets, parsing binary email attachments, and more in a very understandable and open fashion. It also discusses existing modules and their "hidden" usefulness (Hint: Net::Telnet can be used to SSH). The author is to be commended on his ability to make these cryptic topics understood.
When I first flipped through Network Programming with Perl, I immediately found the solution to a problem I was having for the previous few days. A few more moments, I saw solutions to problems that associates were having. It's not very often a single book can do that without a thorough reading, but this one came through brilliantly.
I strongly recommend this book to anyone serious about taking their Perl expertise to the next level.
Comment 58 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book has excellent coverage of forking, multithreading, multiplexing, and non-blocking IO. Good coverage of this material is hard to find. Most books just concentrate on specific protocols such as POP, IMAP, FTP, SMTP, etc. This book also covers that material, but unlike other books, this one will actually start you off understanding sockets, pipes and signals rather than just showing you how to to use a bunch of libs. There is plenty of example source code here too.
Comment 49 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book has been in my wish list for pretty long time, and before I actually buy it decided to check it out of my school's library. Enjoyment started at the first chapters of the book that I read in the library's caffeteria. The book definitely covers all the aspects of the Network Progamming, not only with Perl, but in general as well.
In the first chapters of the book, Lincoln Stein makes good use of such OO modules as IO::File and IO::Socket to demostrate that difference between local file operations and remote network programming isn't that much different at all ( at least in Perl ).
Chapter 2 shows you several applications that are built on pipes. The best thing about the chapter was the signals part, where L. Stein shows examples, catching all sorts of signals that your progam receives and reacts accordingly. One example was reacting to pressing of CTRL+C sequence of keys to terminate the progam.
I would call Chapter 3 the heart of the book, since it goes over Berkeley Sockets, the base for Network progamming in most systems, no matter what progamming language you tend to prefer. It also explains thoroughly Sockets Addressings, Network naming conventions, protocols, services and a lot more. This chapter, together with the Chapter 4 alone are worth the whole price of the book, I believe. The chapter in the end goes over some common netwook analysis tools, such as "nslookup", "ping", so on and so forth.
Chapter 4 tells you all you need about TCP Protocol. Shows several examples as well. Goes over Adjusting Socket options, and their uses.
Chapter 5 is not anything newer supposing you've been following all the pervious chapters. Untill this chapter, L. Stein demonstrates the coding using much low level Socket API.
Read more ›
Comment 9 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
The first thing I want to point out for many readers who may not know this: Lincoln Stein is the author of CGI.pm -- the module that is resonsible for a vast majority of perl powered websites on the internet. Second, Lincoln has contributed enormous amounts of code to the perl community, and I originally bought this book as an insight to the code of his that I have and want to work with further.
Let me say that a lot of the book focuses on modules like Net::Telnet and Net::FTP. That isnt particularly useful to me because I have a firm understanding of them already.
The real meat of the book, if you ask me, is the discussion of fully multiplexed servers that are able to handle many simultaneous upstreams and downstreams, and do a vast array of things.
His code is very clear and concise, as well as commented and explained throughout the text. This is definitely something every perl programmer who writes network maintenance code should have.
Comment 16 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
As an intermediate Perl programmer and a relative newcomer to network programming, I found Part 1, The Basics, to be pure gold. Dr. Stein's easy-to-follow writing style helped me to finally understand elusive concepts like fork, pipes and sockets.
As the book progresses, it gently builds into more and more advanced network topics. When I hit Part 4, Advanced Topics, I knew was in over my head. Yet, I now have a great reference for the future when I need/want to learn how to play with Broadcasting, UDP servers, etc.
One of the most valuable aspects of this book is his coverage of such a multitude of Perl modules, helping the reader to understand the each of modules' basic API in a straightforward manner.
This book is worth every cent.
Comment 6 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews

Set up an Amazon Giveaway

Network Programming with Perl
Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more about Amazon Giveaway
This item: Network Programming with Perl