-
- Weitere Informationen zu diesem Buch:
Inhaltsverzeichnis | Index | Probekapitel | Rezensionen |
Beispiele |
- Weitere Informationen zu diesem Buch:
Fourth Edition August 2005
ISBN 978-0-596-10105-3
Weitere Informationen zu diesem Buch
Inhaltsverzeichnis |
Index |
Probekapitel |
Rezensionen |
Beispiele |
Inhaltsverzeichnis
Preface
1. Introduction
Questions and Answers
What Does "Perl" Stand For?
How Can I Get Perl?
How Do I Make a Perl Program?
A Whirlwind Tour of Perl
Exercises2. Scalar Data
Numbers
Strings
Perl's Built-in Warnings
Scalar Variables
Output with print
The if Control Structure
Getting User Input
The chomp Operator
The while Control Structure
The undef Value
The defined Function
Exercises3. Lists and Arrays
Accessing Elements of an Array
Special Array Indices
List Literals
List Assignment
Interpolating Arrays into Strings
The foreach Control Structure
Scalar and List Context
<STDIN> in List Context
Exercises4. Subroutines
Defining a Subroutine
Invoking a Subroutine
Return Values
Arguments
Private Variables in Subroutines
Variable-Length Parameter Lists
Notes on Lexical (my) Variables
The use strict Pragma
The return Operator
Non-Scalar Return Values
Exercises5. Input and Output
Input from Standard Input
Input from the Diamond Operator
The Invocation Arguments
Output to Standard Output
Formatted Output with printf
Filehandles
Opening a Filehandle
Fatal Errors with die
Using Filehandles
Reopening a Standard Filehandle
Exercises6. Hashes
What Is a Hash?
Hash Element Access
Hash Functions
Typical Use of a Hash
Exercises7. In the World of Regular Expressions
What Are Regular Expressions?
Using Simple Patterns
Character Classes
Exercises8. Matching with Regular Expressions
Matches with m//
Option Modifiers
Anchors
The Binding Operator, =~
Interpolating into Patterns
The Match Variables
General Quantifiers
Precedence
A Pattern Test Program
Exercises9. Processing Text with Regular Expressions
Substitutions with s///
The split Operator
The join Function
m// in List Context
More Powerful Regular Expressions
Exercises10. More Control Structures
The unless Control Structure
The until Control Structure
Expression Modifiers
The Naked Block Control Structure
The elsif Clause
Autoincrement and Autodecrement
The for Control Structure
Loop Controls
Logical Operators
Exercise11. File Tests
File Test Operators
The stat and lstat Functions
The localtime Function
Bitwise Operators
Using the Special Underscore Filehandle
Exercises12. Directory Operations
Moving Around the Directory Tree
Globbing
An Alternate Syntax for Globbing
Directory Handles
Recursive Directory Listing
Manipulating Files and Directories
Removing Files
Renaming Files
Links and Files
Making and Removing Directories
Modifying Permissions
Changing Ownership
Changing Timestamps
Exercises13. Strings and Sorting
Finding a Substring with index
Manipulating a Substring with substr
Formatting Data with sprintf
Advanced Sorting
Exercises14. Process Management
The system Function
The exec Function
The Environment Variables
Using Backquotes to Capture Output
Processes as Filehandles
Getting Down and Dirty with fork
Sending and Receiving Signals
Exercises15. Perl Modules
Finding Modules
Installing Modules
Using Simple Modules
Exercise16. Some Advanced Perl Techniques
Trapping Errors with eval
Picking Items from a List with grep
Transforming Items from a List with map
Unquoted Hash Keys
Slices
ExerciseA. Exercise Answers
B. Beyond the Llama
Index
Zurück zu Learning Perl