Developers: Learn a New Programming Language or App Development with Deitel LiveLessons Videos!
s
menu
menu
Login  |  Register  |  Media Kit  |  Press  |  Contact Us  |   Twitter Become a Deitel Fan on Facebook  
Custom Search
 
AddThis Social Bookmark Button

Table of Contents: Perl How to Program

Preface

1 - Introduction to Computers, the Internet and the World Wide Web

1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Evolution of Operating Systems
1.5 Personal Computing, Distributed Computing and Client/Server Computing
1.6 Machine Languages, Assembly Languages and High-level Languages
1.7 Structured Programming
1.8 Object-Oriented Programming
1.9 Hardware Trends
1.10 History of the Internet
1.11 History of the World Wide Web
1.12 History of Perl
1.13 Perl Library
1.14 General Notes About Perl and This Book
1.15 A Tour of the Book
1.16 Internet and World Wide Web Resources
 

2 - Introduction to Programming in Perl

2.1 Introduction
2.2 Simple Programs that Display Lines of Text
2.2.1 A Simple Program: Printing a Line of Text
2.2.2 Executing the Program
2.2.3 A Simple Program: Printing Several Lines of Text
2.3 Another Simple Program: Adding Two Integers
2.4 Memory Concepts
2.5 Scalar Values and Scalar Variables
2.6 Arithmetic Operators
2.7 Assignment Operators
2.8 Increment and Decrement Operators
2.9 Decision Making: Equality and Relational Operators
2.10 Confusing Equality (==) and Assignment (=) Operators
2.11 String Operators
2.12 Numeric and String Contexts
2.13 Internet and World Wide Web Resources
 

3 - Control Structures: Part I

3.1 Introduction
3.2 Algorithms
3.3 Pseudocode
3.4 Control Structures
3.5 if and unless Selection Structures
3.6 if/else and if/elsif/else Selection Structures
3.7 while and until Repetition Structures
3.8 do/while and do/until Repetition Structures
3.9 Formulating Algorithms: Case Study 1 (Counter-controlled Repetition)
3.10 Formulating Algorithms with Top-down, Stepwise Refinement:
Case Study 2 (Sentinel-controlled Repetition)
3.11 Formulating Algorithms with Top-down, Stepwise Refinement:
Case Study 3 (Nested Control Structures)
3.12 Internet and World Wide Web Resources

4 - Arrays and Hashes

4.1 Introduction
4.2 Additional Data Types
4.3 Lists and List Context
4.4 Arrays
4.5 Creating and Manipulating an Array
4.6 Repetition with the for Structure
4.7 Additional Examples of Creating Arrays
4.8 Array Manipulation
4.9 Array Functions
4.10 List Functions
4.11 Searching Sorted Arrays
4.11.1 Linear Search
4.11.2 Binary Search
4.12 Introduction to Hashes
4.13 Creating and Manipulating a Hash
4.14 Hash-related Functions
4.15 Internet and World Wide Web Resources

5 - Control Structures: Part II

5.1 Introduction
5.2 foreach Repetition Structure
5.3 Special Variable $_
5.4 Loop Control Shortcuts: grep and map
5.5 Case Study: Computing Mean, Median and Mode
5.6 Loop Controls: The next Statement
5.7 Loop Controls: The last Statement
5.8 Loop Controls: The redo Statement
5.9 Block Labels
5.10 Bare Blocks
5.11 Logical Operators
5.12 Using Logical Operators for Flow Control
5.13 Error Functions: die and warn
5.14 Summary of Structured Programming

6 - Subroutines and Functions

6.1 Introduction
6.2 Subroutines in Perl
6.3 Built-in Math Functions
6.4 User-defined Subroutines
6.5 Argument Lists
6.6 Returning Values
6.7 Other Ways to Invoke a Subroutine
6.8 Random-Number Generation
6.9 Example: A Game of Chance
6.10 Recursion
6.11 Example Using Recursion: Fibonacci
6.12 Recursion vs. Iteration
6.13 Scope Rules: Global, Lexical and Dynamic
6.14 Namespaces, Packages and Modules
6.14.1 Defining a Package and Importing it with require
6.14.2 Modules and the use Statement
6.14.3 Other Features of the use Statement
6.15 Pragmas

7 - Introduction to the Common Gateway Interface (CGI)

7.1 Introduction
7.2 A Simple HTTP Transaction
7.3 A Simple CGI Script
7.4 Using CGI.pm to Generate HTML
7.5 Sending Input to a CGI Script
7.6 Using HTML Forms to Send Input
7.7 Using CGI.pm to Create Forms and Read Input
7.8 Other Headers
7.9 Example: An Interactive Portal
7.10 Internet and World Wide Web Resources
 

8 - Regular Expressions

8.1 Introduction
8.2 Matching Operator m//
8.3 Substitution Operator s///
8.4 Special Characters and Character Classes
8.5 Alternation
8.6 Quantifiers
8.7 Quantifier Greediness
8.8 Assertions
8.9 Backreferences
8.10 More Regular-Expression Modifiers
8.11 Global Searching and the /g Modifier
8.12 Example: Form Verification
8.13 Internet and World Wide Web Resources

9 - String Manipulation

9.1 Introduction
9.2 Quotes and Quote Operators
9.3 "Here" Documents
9.4 Basic String Functions
9.5 chop and chomp functions
9.6 index and rindex Functions
9.7 Function join
9.8 Function split
9.9 tr/// Translation Operator
9.10 Formatting Outputs with printf and sprintf
9.11 Printing with Field Widths and Precision
9.12 Using Flags in the printf Format Control String
9.13 Evaluating Strings as Perl Code

10 - File Processing

10.1 Introduction
10.2 Data Hierarchy
10.3 Filehandles
10.4 Opening and Closing Filehandles
10.5 Using Filehandles
10.6 @ARGV Special Variable
10.7 Other Ways to Read from Files
10.8 Implementing a Random-Access File
10.9 Example: Web-Page Log Generator
10.10 Example: Guestbook
10.11 Internet and World Wide Web Resources

11 - File and Directory Manipulation

11.1 Introduction
11.2 File Tests and sysopen
11.3 Permissions
11.4 File Manipulation
11.5 Hard Links and Symbolic Links
11.6 File Globbing
11.7 Directory Handles and Manipulation
11.8 Example: Web Site Recent-Update Page

12 - Formatting

12.1 Introduction
12.2 Creating Formatted Reports
12.3 Top-of-Form Processing
12.4 Multiple-Line Format Fields
12.5 Format Variables
12.6 Case Study: Outputting a Database
12.7 Case Study: Web Log Analyzer

13 - References

13.1 Introduction
13.2 References
13.3 References to Nonscalars
13.4 Anonymous Structures
13.5 Closures
13.6 References as Function Arguments
13.7 Nested Data Structures
13.8 Garbage Collection and Circular References
13.9 Symbolic References
13.10 Typeglobs
13.11 Referencing Filehandles
13.12 Uses for References
13.13 Internet and World Wide Web Resources

14 - Objects and Modules

14.1 Introduction
14.2 Using a Class
14.3 Creating a Simple Class
14.4 Inheritance
14.5 Overriding Methods
14.6 Other Class Relationships: Multiple Inheritance, Composition and Containment
14.7 Base Class UNIVERSAL
14.8 Encapsulation: Public vs. Private
14.9 Closure Method
14.10 Implicit Functions
14.11 AUTOLOAD Function
14.12 Tied Variables
14.13 Internet and World Wide Web Resources

15 - Databases: SQL and Perl Database Interface (DBI)

15.1 Introduction
15.2 Relational Database Model
15.3 Relational Database Overview: Employee.mdb
15.4 Structured Query Language (SQL)
15.4.1 Basic SELECT Query
15.4.2 WHERE Clause
15.4.3 ORDER BY Clause
15.4.4 Inserting a Record
15.4.5 Updating a Record
15.4.6 Deleting a Record
15.5 Introduction to DBI
15.6 Working with DBI
15.7 Manipulating a Database with DBI
15.8 DBI and the Web
15.9 DBI Utility Functions
15.10 MySQL Server
15.11 Internet and World Wide Web Resources

16 - Session Tracking and Cookies

16.1 Introduction
16.2 Uses of Storing Data
16.3 Methods of Storing Data
16.4 Query Strings
16.5 Hidden Fields
16.6 Cookies
16.7 Server-side Files
16.8 Example: Shopping Cart

17 - Web Automation and Networking

17.1 Introduction
17.2 Introduction to LWP
17.3 LWP Commands
17.4 The LWP::Simple Module
17.5 HTML Parsing
17.6 Introduction to Advanced Networking
17.7 Protocols
17.8 Transport Control Protocol (TCP)
17.9 Simple Mail Transfer Protocol (SMTP)
17.10 Post Office Protocol (POP)
17.11 Searching the World Wide Web

18 - Process Management

18.1 Introduction
18.2 The fork command
18.3 The system and exec functions
18.4 Controlling the Input and Output of Processes
18.5 Communicating Between Processes
18.6 Signal Handling
18.7 Sending Signals
18.8 OLE Automation

19 - Security

19.1 Introduction
19.2 What Makes a Program Insecure
19.3 Using User Data with Shell Commands
19.4 Defensive Programming
19.5 Taint Mode
19.6 Printing User Input to a Web Page
19.7 Denial-of-Service Attacks
19.8 Other Security Attacks
19.9 Using Hidden Fields
19.10 Introduction to Cryptography Theory
19.11 Using Encryption
19.12 Secret-key Cryptography
19.13 Public-Key Cryptography
19.14 Key Agreement Protocols
19.15 Key Management
19.16 Digital Signatures
19.17 Public-Key Infrastructure, Certificates and Certification Authorities
19.18 Cryptanalysis
19.19 Security Protocols
19.19.1 Secure Sockets Layer (SSL)
19.19.2 Secure Electronic Transaction™ (SET™)
19.20 Network Security
19.20.1 Firewalls
19.20.2 Kerberos
19.20.3 Biometrics
19.21 Steganography
19.22 Internet and World Wide Web Resources

20 - Data Structures

20.1 Introduction
20.2 Self-referential Structures
20.3 Linked Lists
20.4 Doubly Linked Lists
20.5 Stacks and Queues
20.6 Trees
20.7 Hashes

21 - Graphics/Tk

21.1 Introduction
21.2 GD Module: Creating Simple Shapes
21.3 GD Module: Image Manipulation
21.4 Chart Module
21.5 Introduction to GUI
21.6 Introduction to Tk
21.7 Tk: GUI Components
21.8 Tk Case Study: A GUI Application

22 - Extensible Markup Language (XML)

22.1 Introduction
22.2 Perl and XML
22.3 Structuring Data
22.4 XML Namespaces
22.5 Document Type Definitions (DTD) and Schema
22.5.1 Document Type Definitions
22.5.2 W3C XML Schema
22.6 Customized Markup Languages
22.6.1 MathML
22.6.2 WML
22.6.3 XBRL
22.6.4 ebXML
22.6.5 FpML
22.6.6 Other Markup Languages
22.7 Document Object Model (DOM)
22.8 XML::DOM
22.9 DOM Methods
22.10 Simple API for XML (SAX)
22.11 Parsing XML with XML::Parser
22.12 Data::Dumper and XML
22.13 Extensible Style Language (XSL)
22.14 Generating XML in Perl
22.15 Case Study: Message Forums with Perl and XML
22.15.1 Displaying the Forums using XML::Parser
22.15.2 Using XML::DOM to Add Forums and Messages
22.15.3 Alterations for Non-XSL Browsers
22.16 Internet and World Wide Web Resources

23 - Accessibility

23.1 Introduction
23.2 Providing Alternatives for Multimedia Content
23.3 Maximizing Readability by Focusing on Structure
23.4 Accessibility in HTML Tables
23.5 Accessibility in HTML Frames
23.6 Using Voice Synthesis and Recognition with VoiceXML™
23.7 JAWS® for Windows
23.8 Other Accessibility Tools
23.9 Internet and World Wide Web Resources

24 - Bonus: Introduction to HyperText Markup Language 4: Part I

24.1 Introduction
24.2 Markup Languages
24.3 Editing HTML
24.4 Common Elements
24.5 Headers
24.6 Linking
24.7 Images
24.8 Special Characters and More Line Breaks
24.9 Unordered Lists
24.10 Nested and Ordered Lists
24.11 Internet and World Wide Web Resources

25 - Bonus: Introduction to HyperText Markup Language 4: Part II

25.1 Introduction
25.2 Basic HTML Tables
25.3 Intermediate HTML Tables and Formatting
25.4 Basic HTML Forms
25.5 More Complex HTML Forms
25.6 Internal Linking
25.7 Creating and Using Image Maps
25.8 <meta> Tags
25.9 frameset Element
25.10 Nested framesets
25.11 Internet and World Wide Web Resources

26 - Bonus: Cascading Style Sheets™ (CSS)

26.1 Introduction
26.2 Inline Styles
26.3 Creating Style Sheets with the style Element
26.4 Conflicting Styles
26.5 Linking External Style Sheets
26.6 Positioning Elements
26.7 Backgrounds
26.8 Element Dimensions
26.9 Text Flow and the Box Model
26.10 User Style Sheets
26.11 Internet and World Wide Web Resources

27 - Bonus: Introduction to Python Programming

27.1 Introduction
27.1.1 A first Python program
27.1.2 Python keywords
27.2 Basic Data Types, Control Structures and Functions
27.3 Tuples, Lists and Dictionaries
27.4 String Processing and Regular Expressions
27.5 Exception handling
27.6 Introduction to CGI programming
27.7 Form Processing and Business Logic
27.8 Cookies
27.9 Database Application Programming Interface (DB-API)
27.9.1 Setup
27.9.2 Simple DB-API program
27.10 Object-Oriented Programming
27.11 Case Study: GUI Database Application
27.11.1 Gadfly
27.11.2 Tkinter
27.11.3 Setup
27.11.4 GUI Database Viewer Implementation
27.12 Operator Precedence Chart
27.13 Internet and World Wide Web Resources
 

A - HTML Special Characters

B - HTML Colors

C - ASCII Character Set

D - Operator Precedence Chart

E - Number Systems

E.1 Introduction
E.2 Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers
E.3 Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers
E.4 Converting from Binary, Octal, or Hexadecimal to Decimal
E.5 Converting from Decimal to Binary, Octal, or Hexadecimal
E.6 Negative Binary Numbers: Two's Complement Notation

F - Career Resources

F.1 Introduction
F.2 Online Career Services
F.3 Career Opportunities for Employees
F.3.1 Comprehensive Career Sites
F.3.2 Technical Positions
F.3.3 Contracting Online
F.3.4 Executive Positions
F.3.5 Students and Young Professionals
F.3.6 Other Online Career Services
F.4 Online Opportunities for Employers
F.4.1 Posting Jobs Online
F.4.2 Diversity in the Workplace
F.4.3 Recruiting Services
F.4.4 Testing Potential Employees Online
F.5 Internet and World Wide Web Resources
 

G - Perl 6 Web Resources

G.1 Introduction
G.2 Future of Perl
G.3 Internet and World Wide Web Resources

Bibliography


Index

 

Discounts on SafariBooksOnline.com subscriptions

 
Perl How to Program Cover


ISBN: 0130284181
© 2001

Order now at
Amazon.com
InformIT.com

Additional Resources
Download Code
Examples and
Other Premium
Content for
Registered Users

Login or Register to download this book's code examples and other premium content.

foot
Update :: December 15, 2017