Home Page Icon
Home Page
Table of Contents for
Hashes
Close
Hashes
by Randal L. Schwartz, Tom Christiansen
Learning Perl, Second Edition
Copyright
Foreword
Second Edition Update
Preface
What This Book Is About
Retrieving Exercises
Additional Resources
How to Get Perl
Conventions Used in This Book
Support
Acknowledgments for the First Edition
Acknowledgments for the Second Edition
We'd Like to Hear from You
Introduction
History of Perl
Purpose of Perl
Availability
Basic Concepts
A Stroll Through Perl
Exercise
Scalar Data
What Is Scalar Data?
Numbers
Strings
Scalar Operators
Scalar Variables
Scalar Operators and Functions
<STDIN> as a Scalar Value
Output with print
The Undefined Value
Exercises
Arrays and List Data
What Is a List or Array?
Literal Representation
Variables
Array Operators and Functions
Scalar and List Context
<STDIN> as an Array
Variable Interpolation of Arrays
Exercises
Control Structures
Statement Blocks
The if/unless Statement
The while/until Statement
The for Statement
The foreach Statement
Exercises
Hashes
What Is a Hash?
Hash Variables
Literal Representation of a Hash
Hash Functions
Hash Slices
Exercises
Basic I/O
Input from STDIN
Input from the Diamond Operator
Output to STDOUT
Exercises
Regular Expressions
Concepts About Regular Expressions
Simple Uses of Regular Expressions
Patterns
More on the Matching Operator
Substitutions
The split and join Functions
Exercises
Functions
Defining a User Function
Invoking a User Function
Return Values
Arguments
Private Variables in Functions
Semiprivate Variables Using local
File-Level my( ) Variables
Exercises
Miscellaneous Control Structures
The last Statement
The next Statement
The redo Statement
Labeled Blocks
Expression Modifiers
&& and || as Control Structures
Exercises
Filehandles and File Tests
What Is a Filehandle?
Opening and Closing a Filehandle
A Slight Diversion: die
Using Filehandles
The -x File Tests
The stat and lstat Functions
Exercises
Formats
What Is a Format?
Defining a Format
Invoking a Format
More About the Fieldholders
The Top-of-Page Format
Changing Defaults for Formats
Exercises
Directory Access
Moving Around the Directory Tree
Globbing
Directory Handles
Opening and Closing a Directory Handle
Reading a Directory Handle
Exercises
File and Directory Manipulation
Removing a File
Renaming a File
Creating Alternate Names for a File: Linking
Making and Removing Directories
Modifying Permissions
Modifying Ownership
Modifying Timestamps
Exercises
Process Management
Using system and exec
Using Backquotes
Using Processes as Filehandles
Using fork
Summary of Process Operations
Sending and Receiving Signals
Exercises
Other Data Transformation
Finding a Substring
Extracting and Replacing a Substring
Formatting Data with sprintf( )
Advanced Sorting
Transliteration
Exercises
System Database Access
Getting Password and Group Information
Packing and Unpacking Binary Data
Getting Network Information
Exercise
User Database Manipulation
DBM Databases and DBM Hashes
Opening and Closing DBM Hashes
Using a DBM Hash
Fixed-Length Random Access Databases
Variable-Length ( Text) Databases
Exercises
Converting Other Languages to Perl
Converting awk Programs to Perl
Converting sed Programs to Perl
Converting Shell Programs to Perl
Exercise
CGI Programming
The CGI.pm Module
Your CGI Program in Context
Simplest CGI Program
Passing Parameters via CGI
Less Typing
Form Generation
Other Form Elements
Creating a Guestbook Program
Troubleshooting CGI Programs
Perl and the Web: Beyond CGI Programming
Further Reading
Exercises
Exercise Answers
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Libraries and Modules
Library Terminology
Standard Modules
CPAN: Beyond the Standard Library
Networking Clients
A Simple Client
A Webget Client
An Interactive Client
Further Reading on Networking
Topics We Didn't Mention
Full Interprocess Communications
The Debugger
The Command Line
Other Operators
Many, Many More Functions
Many, Many Predefined Variables
Symbol Table Manipulation with *FRED
Additional Regular-Expression Features
Packages
Embeddible, Extensible
And Other Stuff
Colophon
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Exercises
Next
Next Chapter
What Is a Hash?
Chapter 5. Hashes
What Is a Hash?
Hash Variables
Literal Representation of a Hash
Hash Functions
Hash Slices
Exercises
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset