Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Perl and CGI for the World Wide Web - Elizabeth Castro

Perl and CGI for the World Wide Web

Visual QuickStart Guide
Buch | Softcover
272 Seiten
1998
Addison Wesley (Verlag)
978-0-201-35358-7 (ISBN)
CHF 31,25 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
For the advanced and amateur developer, this book examines Perl, the language for creating CGI scripts that let you add forms, guest books, counters, and surveys to your Web site. It shows how to deal with existing scripts and teaches Mac and Window users UNIX to run their scripts on UNIX servers.
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, enables visitors to conduct keyword searches, and lets you 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, use their newfound familiarity with Perl to understand and customize the multitude of scripts that already exist on the Web. Following on the huge success of Elizabeth Castro's top-selling HTML 4: Visual QuickStart Guide ---the book on HTML--her Perl and CGI for the World Wide Web: Visual QuickStart Guide is sure to become the choice for learning Perl and CGI.

Elizabeth Castro began working with the Macintosh in a software development and distribution company called CTA, in Barcelona, Spain. Her first project was the translation of an OCR program into English, which was quickly followed by the translation of Aldus PageMaker (version 3!) into Spanish. Castro's department, Publications, was soon translating other programs from Aldus, as well as software from Agfa, Farallon and the Wheels for the Mind magazine for Apple Computer Spain. In 1990, Castro founded Pagina Uno together with Oriol Carbo. One of Pagina Uno's first projects was the translation of The Macintosh Bible, 3rd edition, into Spanish: La Biblia del Macintosh. It was a great success, thanks to the unerring tone of Arthur Naiman combined with the brilliant translation of Jose Rafael Garcia Bermejo (affectionately known as Coti) and Oriol Carbo, among others. Pagina Uno published several more Peachpit books about the Macintosh in Spanish and also began to localize Adobe products like Photoshop, Premiere and Dimensions into Spanish. In 1993, Castro left Pagina Uno (and her beloved Barcelona) and returned to the US to edit the fifth edition of the Mac Bible.

1. Perl Building Blocks.


Perl data. Operators and functions. Quotation marks.



2. Creating Perl CGI Scripts.


Creating a Perl CGI script. Starting a Perl CGI script. Writing code in Perl. Creating output for a browser. Documenting your script. Uploading your script to the server. Changing permissions. Checking the script's syntax. Running a Perl CGI script.



3. Getting Data from Visitors.


Labeling incoming data. Creating a form. Creating text boxes. Creating password boxes. Creating larger text areas. Creating radio buttons. Creating checkboxes. Creating menus. Creating the submit button. Resetting the form. Using an image to submit data. Creating a link to a script. Using a link to input data to a script. Adding default data to a form.



4. Environment Variables.


Using environment variables to parse forms. Your visitor's browser and platform. How did your visitor get to your page?. Viewing all the environment variables.



5. Getting Data into the Script.


Inputting data from a form or a link. Inputting data from environment variables. Inputting scalar data yourself. Inputting arrays yourself. Inputting hashes yourself.



6. Working with Scalars.


Storing the result of an operation. Multiplying, dividing, adding, subtracting. Using more than one operator at a time. Raising a number to an exponential power. Getting the remainder of a division. Connecting strings together. Repeating a string. Operating and assigning in one step. Incrementing (or decrementing) a variable.



7. Working with Arrays.


Getting a particular item from an array. Splitting a scalar into an array. Modifying all the members of an array. Finding the length of an array. Getting multiple items from an array. Adding items to the beginning of an array. Adding items to the end of an array. Combining two arrays. Removing the first item in an array. Removing the last item in an array. Replacing an item in an array. Replacing more than one item in an array. Sorting arrays. Reversing the order of an array's contents.



8. Conditional Statements.


Comparing numbers. Comparing strings. Evaluating conditions without comparisons. Testing two or more comparisons at a time. Creating a basic conditional statement. Adding options for false conditions. Adding multiple, independent conditions. Using unless. Repeating a block while a condition is true. Repeating a block while a condition is false. Executing the block at least once. Repeating a block a given number of times. Repeating a block for each item in an array. Nesting conditional statements.



9. Subroutines.


Creating a simple subroutine. Using a simple subroutine. Creating a subroutine that takes input. Calling a subroutine that takes input. Using a subroutine's return value. Setting the return value manually. Storing subroutines in a separate file. Calling subroutines from an external file.



10. Working with Hashes.


Getting a value by using a key. Getting several values using keys. Getting all of a hash's values. Getting all of a hash's keys. Getting each key and value in a hash. Removing key-value pairs. Checking to see if a key exists.



11. Analyzing Data.


Finding something. Finding and replacing. Seeing and using what was found. Splitting a value into pieces. Constructing search patterns. Tips for constructing search patterns. Matching a single character. Matching a string of characters. Matching a character from a group. Matching a character that's not in the group. Using class shorthands. Limiting the location. Choosing how many to match. Curbing a quantifier's greediness. Matching one element or another. More on using what you already matched.



12. Remembering What Your Visitors Tell You.


About hidden fields. Adding hidden fields to a form. Storing collected data in a hidden field. About cookies. Looking at your browser's cookies. Sending a cookie. Setting a cookie's expiration date. Limiting a cookie to a domain. Limiting a cookie to a part of your server. Limiting cookies to secure connections. Reading and using a cookie. How (and why) your visitors refuse cookies.



13. Printing and HTML.


Formatting output with HTML. Printing several lines at a time. Simplifying paths to images and links. Creating header and footer subroutines. Outputting a hash as a table. Outputting an array as a list. Formatting numbers and strings. Formatting numbers as dollars and cents. Padding numbers.



14. Files and Directories.


Opening a file. Verifying file and directory operations. Writing to an external file. Getting exclusive access to a file. Reading data from an external file. Closing a file. Renaming a file. Removing a file. Checking a file's status. Accessing a directory. Reading the contents of a directory. Closing a directory. Changing the working directory. Creating a directory. Changing permissions from within a script. Removing a directory. Getting ready to e-mail output. Sending output via e-mail. Eliminating extra returns.



15. Debugging.


Checking the easy stuff. Creating an error subroutine. Narrowing it down by commenting it out. Following a variable's progress.



16. Using Other Folks' Scripts.


Using other folks' scripts. Getting other people's scripts. Expanding compressed scripts. Configuring borrowed scripts. Customizing borrowed scripts.



Appendix A. Parsing Form Input.


Creating a subroutine. Determining which method was used. Getting name-value pairs from GET. Getting name-value pairs from POST. Storing name-value pairs in a hash. Using the parsed data.



Appendix B. Permissions.


Who's the owner? Default permissions. Figuring out the new permissions code.



Appendix C. Security.


Monitoring visitor input. Watching what is sent to the server. Avoiding tainted data.



Appendix D. Unix Essentials.


Telnetting to your Unix server. Executing commands in Unix. Dealing with paths in Unix. Changing the working directory. Finding out where you are. Listing directory contents. Eliminating files. Creating and eliminating directories. Decompressing tar and zipped files. Getting help with Unix.



Appendix E. Perl and CGI Resources.


Text editors.

Erscheint lt. Verlag 2.12.1998
Verlagsort Harlow
Sprache englisch
Gewicht 425 g
Themenwelt Mathematik / Informatik Informatik Netzwerke
Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Software Entwicklung Objektorientierung
ISBN-10 0-201-35358-X / 020135358X
ISBN-13 978-0-201-35358-7 / 9780201353587
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
objektorientierte Entwicklung modularer Maschinen für die digitale …

von Thomas Schmertosch; Markus Krabbes; Christian Zinke-Wehlmann

Buch | Hardcover (2024)
Hanser (Verlag)
CHF 62,95
Entwicklung von GUIs für verschiedene Betriebssysteme

von Achim Lingott

Buch (2023)
Hanser, Carl (Verlag)
CHF 55,95
Principles and Practice Using C++

von Bjarne Stroustrup

Buch | Softcover (2024)
Addison Wesley (Verlag)
CHF 119,95