Perl for C Programmers

Book description

The Perl book written for the C and C++ programmer. Perl for C Programmers teaches what's similar and different between Perl and C/C++ and how to then utilize Perl to the fullest. 80% of the people who start using Perl for the first time come with a background in the C or C++ programming language. This book is written for those people. Perl is becoming one of the most common languages used in web development because of its powerful ability for text manipulation. There is a large need for Perl books that clearly explain how to use Perl in terms the reader can understand. The primary audience coming to learn Perl is C and C++ programmers.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewers
  4. Acknowledgments
  5. Tell Us What You Think
  6. Introduction
  7. Using Perl
    1. Exploring Perl
      1. Online Documentation
      2. CPAN (The Module Archive)
      3. Installing Modules
      4. Using the Perl Debugger
      5. Summary
      6. Exercises
      7. Resources
    2. Perl Basics
      1. Writing Your First Perl Program
      2. Variable Declarations and Simple Expressions
      3. Reading Input
      4. The if Statement and Relational Operators
      5. The Definition of Truth
      6. Looping Statements
      7. Simple I/O
      8. Summary
      9. Exercises
      10. Resources
    3. Arrays
      1. Basic Arrays
      2. Manipulating the Array Ends
      3. The splice Function
      4. The split and join Functions
      5. Sorting an Array
      6. Multiple Dimension Arrays
      7. The @ARGV Variable
      8. The English Module
      9. Summary
      10. Exercises
      11. Resources
    4. Regular Expressions
      1. Basic Regular Expressions
      2. Substitutions
      3. The grep Function
      4. Summary
      5. Exercises
      6. Resources
    5. Perl’s New Syntax
      1. New and Useful Syntax
      2. Perl’s Darker Corners
      3. Summary
      4. Exercises
      5. Resources
    6. Hashes, References, and Complex Data Structures
      1. Hashes
      2. References
      3. Translating C Data Structures into Perl
      4. Summary
      5. Exercises
      6. Resources
    7. Subroutines and Modules
      1. Subroutines
      2. Packages
      3. Summary
      4. Exercises
      5. Resources
    8. Object-Oriented Programming
      1. Using a Hash as an Object
      2. Basic Perl Objects
      3. Operator Overloading
      4. Summary
      5. Exercises
      6. Resources
    9. Advanced I/O
      1. Opening a File (Revisited)
      2. sysopen (Advanced open)
      3. Reading a Binary File
      4. File Handling Package
      5. Passing a File Handle to a Subroutine
      6. References to a File Handle
      7. Summary
      8. Exercises
      9. Resources
    10. POD
      1. POD (Plain Old Documentation)
      2. Turning POD into Something Readable
      3. Putting a --help Option in Your Files
      4. The POD Template
      5. Summary
      6. Exercise
      7. Resources
    11. Under the Hood
      1. What Really Goes on When You Use Perl
      2. The Exporter Package
      3. How import and AUTOLOAD Work
      4. Summary
      5. Resources
    12. CGI Programming
      1. Simple CGI
      2. CGI Hello World
      3. Basic Forms
      4. Creating the CGI Program
      5. Debugging a CGI Script
      6. Interactive Debugging
      7. Cookies
      8. Summary
      9. Exercises
      10. Resources
    13. Creating GUIs with Tk
      1. Tk Basics
      2. Tk Widgets
      3. Geometry Managers
      4. Special Widgets
      5. Events
      6. General Design Hints
      7. Putting It All Together
      8. Summary
      9. Exercises
      10. Resources
    14. Combining C and Perl with Inline::C
      1. What Is the Inline Module?
      2. Hello World
      3. Simple Arguments and Return Values
      4. How Perl Handles Variables
      5. Returning Multiple Values
      6. Calling Perl from C
      7. Configuring Inline
      8. Making a Distributable Module
      9. Summary
      10. Exercises
      11. Resources
    15. Putting It All Together
      1. Perl and Databases
      2. Database Design
      3. Database Implementation
      4. The disk.pm Module
      5. GUI Interface
      6. The CGI Version
      7. Errors and Messages
      8. Summary
      9. Exercises
      10. Resources
    16. Cookbook
      1. List Differences
      2. Call 1-800-Confuse-Me
      3. Time Adjustment
      4. Calendar Programs
      5. Duplicate File Checker
      6. Table Formatting
      7. Log File Viewer
      8. Web Site Checker
      9. Orphan Detection
      10. Object File Cross-Reference System
      11. Extracting Information with ox.pl
      12. Counting Web Page Hits
      13. Summary
      14. Exercises
      15. Resources
    17. Creating Modules
      1. The Module Creation Process
      2. Module Creation Cookbook
      3. Debugging a Module
      4. Summary
      5. Exercises
      6. Resources
  8. Appendixes
    1. Installing Perl
      1. Installing Perl on Linux
      2. Installing Perl on UNIX or Linux from Source Code
      3. Installing Perl on Microsoft Windows
    2. Turning Perl Scripts into Commands
      1. The UNIX/Linux Magic String
      2. Using the env Prog ram
      3. The Shell Script Method
      4. Microsoft Windows .bat File
      5. Resources
    3. Beyond Perl
      1. Databases
      2. Tools for C/C++ Programmers
      3. Resources

Product information

  • Title: Perl for C Programmers
  • Author(s): Steve Oualline
  • Release date: July 2002
  • Publisher(s): Sams
  • ISBN: 9780735712287