CGI Programming with Perl, 2nd Edition by Scott Guelich, Shishir Gundavaram and Gunther Birznieks The following changes were made in the 1/01 reprint. {16} Chapter title has been changed to "The Hypertext Transfer Protocol." "Transport" was changed to "Transfer" in first sentence. {20} 2nd paragraph of "URL Encoding": In the parenthetical, "for the first eight bits" now reads "for the first seven bits." {21} url_encode() and url_decode(): The regular expressions in these two functions were missing the VERY needed /g modifier. In each of the code blocks, "ei" was replaced with "egi." [21] url_encode and url_decode code blocks: in url_encode $text =~ s/([^a-z0-9_.!~*'() -])/sprintf "%%%02X", ord($1)/ei; now reads: $text =~ s/([^a-z0-9_.!~*'\(\)-])/sprintf "%%%02X", ord($1)/egi; {21} last paragraph: "url_escape" and "url_unescape" were replaced with "uri_escape" and "uri_unescape". (54) 1.5: "request" now reads "response." (55) "200 OK", 3rd line: response is included in the content. now reads response is included in this message. {67} bottom half, the line: Content-Length: 67 now reads Content-Length: 40 (68) 2nd paragraph: Table 4-1 shows a short list of all the available form tags. now reads Table 4-1 shows a short list of available form tags. (68) table: A new row was added after 10th row: (68) table, 12th row: VALUE="Message!"> now reads VALUE="value"> (69) ACTION, 2nd line: "the HTTP request made by the CGI script" now reads "... made by the browser" {78} (80) second sentence of "ROWS" description: The sentence now begins "Text areas ..." instead of "Text bars". {81} 3.3: "[\da-f]" was changed to "[a-f0-9]" in lines 17 and 21 in the parse_form_data subroutine on page 81, twice in each line. (87) "The Kitchen Sink" header was changed to "A Swiss Army Knife" (more of an illustrative metaphor). (96) 1.2: "keywords" (in "the separate keywords method") was italicized. {96} 2nd code block: "$" was added after ".x". {98} 2nd block of code: A line of code was inserted:

{100} line 15 was changed to: until ( sysopen OUTPUT, UPLOAD_DIR . $filename, O_CREAT | O_RDWR | O_EXCL ) { {100} The following line was added above the dir_size subroutine (after "close OUTPUT;"): print $q->header( "text/plain" ), "File received."; [100] 6th line of dir_size subroutine: The line while ( readdir DIR ) { now reads foreach ( readdir DIR ) { {109} 2nd paragraph: The line: print $q->start_form( method => "get", action => "/cgi/myscript.cgi"); generates the following perl code:

The line now reads: print $q->start_form( -method => "get", -action=> "/cgi/myscript.cgi"); which will generate the correct perl code: (110) line 3: "array" now reads "array reference" {110} 3rd paragraph example: print $q->radio_group( -name => "curtain" now reads print $q->radio_group( -name => "look_behind" {116} code snippet: "use CGI;" was added at beginning of code. Line 6 now begins with "print". Line 8 now ends with a "," instead of a ";". {117} first code block: Line 6 now ends with a "," instead of a ";". (119) 2nd para below code, lines 3-4: "CGIBook::Exporter::error" now reads "CGIBook::Error::error" (134) Table 6-4, 2nd-to-last row, "Description" column: "param_name" is now set in italics (as in 3 of the other cells above). {155} paragraph before example and example title: "admin_news.epl" now reads "edit_news.epl." (158) Example 6-16, title: "edit_article.ep" now reads "edit_article.epl." {180} line 11: if ( document.mbrowser.artistList.selectedIndex < 0 ) { now reads if ( document.mbrowser.artistList.selectedIndex >= 0 ) { {180} line 28: if ( document.mbrowser.concertList.selectedIndex < 0 ) { now reads if ( document.mbrowser.concertList.selectedIndex >= 0 ) {