Workshop

Quiz

1:To fetch an HTML file from a Web server, what should you do?
  1. Use LWP.

  2. Open a socket to that system and retrieve the data.

  3. Use `lynx –dump` or `netscape –print`.

2:If the LWP::Simple module's get function fails, what does it return?
  1. The error message (that is, "No Document")

  2. The empty string (that is, "")

  3. undef

Answers

A1: a. Although b and c would work, they're not terribly robust or easy to use.
A2: c. The answer was explained in the analysis following Listing 24.2.

Activities

  • You can easily create bar graphs shown for the poll results in Figure 24.4, even without using a graphics module. To do so, you need a 1×1 (or very small) .gif file of the correct color. To make the bar, simply display the .gif file with the appropriate height ...

Get Sams Teach Yourself Perl in 24 Hours 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.