Perl and CGI for the World Wide Web

( 3 )

Overview

Perl is by far the most popular programming language for creating scripts that add powerful interactive features to Web pages. Included on most UNIX platforms and available free of charge for Windows and Macintosh, Perl lets you place forms on your Web site that collect and process user input such as product orders and comments, enable visitors to conduct keyword searches for information on your site, and integrate a database into your site, among many other capabilities. Perl and CGI for the World Wide Web: ...
See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (67) from $1.99   
  • New (4) from $4.95   
  • Used (63) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$4.95
Seller since 2006

Feedback rating:

(118)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Softcover. ISBN: 020135358X. Pristine condition. No wear. No crease on spine. No markings. No remainder mark. Shipped with USPS delivery confirmation.

Ships from: Holmdel, NJ

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$15.58
Seller since 2014

Feedback rating:

(3)

Condition: New
PAPERBACK New 020135358X Brand New US Edition Book in Perfect Condition. Fast Shipping with tracking number.

Ships from: Houston, TX

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(187)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(187)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Perl is by far the most popular programming language for creating scripts that add powerful interactive features to Web pages. Included on most UNIX platforms and available free of charge for Windows and Macintosh, Perl lets you place forms on your Web site that collect and process user input such as product orders and comments, enable visitors to conduct keyword searches for information on your site, and integrate a database into your site, among many other capabilities. Perl and CGI for the World Wide Web: Visual QuickStart Guide gets you to the heart of Perl scripting with CGI. Even first-time programmers will be able to create interactive Web pages and, more importantly, you'll be able to use your new-found familiarity with Perl to understand and customize the multitude of scripts that already exist on the Web. Following on the huge success of Liz Castro's top-selling HTML:Visual QuickStart Guide-the book to have to learn or reference HTML-Castro's Perl and CGI for the World Wide Web: Visual QuickStart Guide is soon to become the choice for learning Perl and CGI. Author of the acclaimed, best-selling HTML:Visual QuickStart Guide, with over 100,000 copies sold. Teaches you all you need to know to start creating CGI scripts in Perl. Shows how to make your Web pages stand out with interactive features such as guest books and forms. Assumes no prior programming experience.
Read More Show Less

Editorial Reviews

Booknews
Taking a visual approach, this guide uses ample screen stills to explain the basic components of Perl, and show how to install and customize existing CGI scripts to build interactivity into Web sites. Annotation c. by Book News, Inc., Portland, Or.
Read More Show Less

Product Details

  • ISBN-13: 9780201353587
  • Publisher: Peachpit Press
  • Publication date: 11/17/1998
  • Series: Visual QuickStart Guide Series
  • Edition description: Older Edition
  • Edition number: 1
  • Pages: 272
  • Product dimensions: 6.95 (w) x 9.02 (h) x 0.73 (d)

Meet the Author


Elizabeth Castro has written three bestselling editions of HTML for the World Wide Web: Visual QuickStart Guide. She also wrote the Macintosh and Windows versions of the Netscape Communicator 4: Visual QuickStart Guide. She was the technical editor for Peachpit's The Macintosh Bible, Fifth Edition, and she founded Pagina Uno, a publishing house based in Barcelona, Spain.
Read More Show Less

Read an Excerpt


Chapter 15: Debugging

Debugging is one of those scary programming words with a simple meaning: reviewing your script and getting out all the kinks (or bugs, as programmers call them). Strangely enough, the most common bugs have nothing to do with Perl and all to do with typing. If you type Print instead of print, Perl will spit out an error. On the next two pages, I point you in the direction of many of these simpler bugs.

You can also create an error subroutine, and then use it in your main script to output specific information (detailed by you) when something happens that shouldn't. Notice, I didn't say "unexpected". Part of your job is to anticipate what might go wrong, or at least test that things go right, and then provide alternatives for when they don't.

A good way to debug your programs is to get rid of all the fluff. If you've got a lot of HTML formatting, get rid of it. If you've got a whole branch of the program that only runs in extreme cases, lose it. You can test bits and pieces of your program by commenting out the parts you don't want to look at momentarily. For more details, consult Narrowing it down by commenting it out on page 215.

Checking The Easy Stuff

Perhaps the biggest mistake that folks make when debugging a script is to look at the most complicated parts first, thinking that that's where an error would be most likely to crop up. The problem is that the complicated parts are complicated to fix but no more likely to contain errors than the simple sections. My advice is to start with the simple stuff and work your way up.

To check the easy stuff:

  • If you're creating and editing scripts on a local computer (say, a Mac or PC), did you actually upload the new version to the server or just save the changes locally? (I've done this a million times!) For more details on uploading files, consult Uploading your script to the server on page 36.
  • Does the ACTION attribute in the FORM tag of the HTML page that calls the script actually point to the right place-including the file name and path?
  • Did you use the Perl interpreter to check your script's syntax? It'll give you clues about where the problem lies (see page 40).
  • Does your script have a shebang line? Does that shebang line correctly point to the Perl interpreter on your server? For more details, consult Starting a Perl CGI script on page 32.
  • Did you set the proper permissions for the script and any other external files and directories that it uses, creates, reads from, or writes to? For more details, consult Changing permissions on page 39 and Appendix B, Permissions.
  • Does your script produce output for the browser? just processing input is not enough. Something, no matter how small, must go to the browser or else your visitor will get a "Document contains no data" error.
  • Did you insert the Mime content line before any output that goes to the browser? For more details, consult Creating output for a browser on page 34.
  • Does every line in your script end with a semicolon? (OK, except the first and last lines of conditional blocks and the shebang line.)
  • Have you preceded quotation marks in HTML coding with backslashes so that Perl doesn't think the quotation marks are meant for it? Have you backslashed other special characters that you want Perl to ignore?
  • Have you spelled everything right, including function names, names and values that must match their counterparts on the HTML form, subroutine names, and others. Watch out for extra spaces, upper and lowercase letters, and special symbols.
  • Are you using the right variable symbol: $ for scalars, @ for arrays and % for hashes? Are you using parentheses instead of curly brackets or vice versa?
  • Do your external files that contain subroutines contain a last line of 1;? if they don't you won't be able to require them successfully (seepage 124).
  • Are you mixed up about a function's return value versus its immediate result? Consult Result vs. Return value on page 27 for more details.
Read More Show Less

Table of Contents

Introduction 13
Ch. 1 Perl Building Blocks 23
Ch. 2 Creating Perl CGI Scripts 29
Ch. 3 Getting Data from Visitors 43
Ch. 4 Environment Variables 59
Ch. 5 Getting Data into the Script 65
Ch. 6 Working with Scalars 73
Ch. 7 Working with Arrays 83
Ch. 8 Conditional Statements 101
Ch. 9 Subroutines 117
Ch. 10 Working with Hashes 127
Ch. 11 Analyzing Data 137
Ch. 12 Remembering What Your Visitors Tell You 161
Ch. 13 Printing and HTML 177
Ch. 14 Files and Directories 189
Ch. 15 Debugging 211
Ch. 16 Using Other Folks' Scripts 217
App. A Parsing Form Input 223
App. B: Permissions 231
App. C Security 235
App. D Unix Essentials 239
App. E Perl and CGI Resources 253
Index 259
Read More Show Less

Customer Reviews

Average Rating 5
( 3 )
Rating Distribution

5 Star

(3)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 7 Customer Reviews
  • Anonymous

    Posted April 14, 2001

    Does the job, to a point.

    I purchased this book because I was just beginning to get into doing webpages on server-side. It started out on a relatively basic level, but it gave me a false sense of completeness. It by no means said that it covered the advanced sections, but when I finished the book I was left with a sense that I knew all the basics of Perl, when actually it left a lot out. I found this out when I tried to find a more advanced follow up to it -- They all required a basic understanding of Perl, and almost immediately they lost me in certain Perl techniques that they claimed were basic. In retrospect, its rather obvious that the author was cramped for space when writing this book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 23, 2000

    Simple to read, easy to understand

    Quick read, day's worth of reading, and gives you all the knowledge you need to know to make some pretty decent CGI scripts...

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 13, 2000

    Wish all computer books were like this!

    I can't say enough good things about this book. Elizabeth Castro has done an outstanding job creating exactly what the cover indicates -- a 'visual quickstart guide.' This book is incredibly clear and straightforward. You get the information you need to get up and running FAST, with no 'dead wood.' Maximum info in a minimum of space. I also like the layout of the book, and even its physical size. I like the way its chapters are organized into easily digestible 'bite-sized' chunks. In my opinion, this is a great book for programmers as well as non-programmers. I've been programming for 21 years, and believe me, I've found no better book for learning a new subject. If there are sections that you already know, they are easily skipped. Interested in learning about Perl and CGI in the easiest, fastest, and clearest possible manner? Get this book!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 25, 2000

    Perl and CGI for the World Wide Web

    If you are a basic or a common web designer, and are affraid of useful scripts like cgi, then this book is for you, It takes you to the cgi script level without even noticing...

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 24, 2000

    Perl and CGI for the World Wide Web

    All I need to say is that I thought CGI script was hard and/or complicated, with this book you just take it easy, so take it easy and buy it...

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 25, 2000

    Great Book Straight to the Point

    I am new to programming. The book started with the basics and went forward. Every line of code was explained in plain english.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted February 9, 2000

    Disappointed

    I can see where this book is strong, but the overall layout is sloppy. Almost every other page has refrences to other pages. For example, pg 141, Castro tells you that you need to look somewhere else in her book, to get some easy steps done leaving the unexperienced person flipping all over the place and getting distracted. The only real strong points are the book looks like a beginners book should on the cover. But again she lies on the cover, 'This Visual QuickStart Guide uses pictures rather than lengthy explanation.' Nope! Unless she means pictures of words. The only pictures in the book are of Her Web Page. Trust me readers that if you are new this isn't the book for you.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 7 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)