Book description
Perl soared to popularity as a language for creating and managing web content, but with LWP (Library for WWW in Perl), Perl is equally adept at consuming information on the Web. LWP is a suite of modules for fetching and processing web pages.The Web is a vast data source that contains everything from stock prices to movie credits, and with LWP all that data is just a few lines of code away. Anything you do on the Web, whether it's buying or selling, reading or writing, uploading or downloading, news to e-commerce, can be controlled with Perl and LWP. You can automate Web-based purchase orders as easily as you can set up a program to download MP3 files from a web site.Perl & LWP covers:
- Understanding LWP and its design
- Fetching and analyzing URLs
- Extracting information from HTML using regular expressions and tokens
- Working with the structure of HTML documents using trees
- Setting and inspecting HTTP headers and response codes
- Managing cookies
- Accessing information that requires authentication
- Extracting links
- Cooperating with proxy caches
- Writing web spiders (also known as robots) in a safe fashion
Table of contents
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. Introduction to Web Automation
- 2. Web Basics
-
3. The LWP Class Model
- 3.1. The Basic Classes
- 3.2. Programming with LWP Classes
- 3.3. Inside the do_GET and do_POST Functions
- 3.4. User Agents
- 3.5. HTTP::Response Objects
- 3.6. LWP Classes: Behind the Scenes
- 4. URLs
- 5. Forms
- 6. Simple HTML Processing with Regular Expressions
- 7. HTML Processing with Tokens
- 8. Tokenizing Walkthrough
- 9. HTML Processing with Trees
- 10. Modifying HTML with Trees
- 11. Cookies, Authentication,and Advanced Requests
- 12. Spiders
- A. LWP Modules
- B. HTTP Status Codes
- C. Common MIME Types
- D. Language Tags
- E. Common Content Encodings
- F. ASCII Table
- G. User’s View of Object-Oriented Modules
- Index
- Colophon
- Copyright
Product information
- Title: Perl & LWP
- Author(s):
- Release date: June 2002
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596001780
You might also like
book
Higher-Order Perl
Most Perl programmers were originally trained as C and Unix programmers, so the Perl programs that …
book
Pro Perl
Over the years, Perl has grown from an elegant scripting tool into a mature and full-featured …
book
Perl Testing: A Developer's Notebook
Is there any sexier topic in software development than software testing? That is, besides game programming, …
book
Perl for Web Site Management
Checking links, batch editing HTML files, tracking users, and writing CGI scripts--these are the often tedious …