De som köpt den här boken har ofta också köpt Play Nice av Jason Schreier (inbunden).
Köp båda 2 för 668 krWith more than a million dedicated programmers, Perl has proven to be the best computing language for the latest trends in computing and business. While other languages have stagnated, Perl remains fresh, thanks to its community-based development ...
Curtis "Ovid" Poe has specialized in Perl since 2000. He is an author, a regular guest speaker at conferences across Europe and the United States, and he wrote the test harness that currently ships with the Perl language. Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.
INTRODUCTION xxiii
CHAPTER 1: WHAT IS PERL? 1
Perl Today 2
Getting Perl 3
Working with Non-Windows Platforms: perlbrew 4
Using Windows 6
The Perl Community 8
IRC 8
PerlMonks 9
Perl Mongers 9
StackOverflow 9
Using perldoc 11
Understanding the Structure of perldoc 11
Getting Started with perldoc 11
Using Tutorials and FAQs 12
Using the perldoc -f function 14
Using a Terminal Window 14
Using the Command Line 15
Creating a Work Directory 16
Creating Hello, World! 18
Writing Your First Program 18
Shebang Lines 21
Summary 22
CHAPTER 2: UNDERSTANDING THE CPAN 25
CPAN and METACPAN 26
Finding and Evaluating Modules 27
Downloading and Installing 29
CPAN Clients 33
Using the CPAN.pm Client 33
Using the Cpanm Client 35
PPM 36
CPAN::Mini 36
Summary 39
CHAPTER 3: VARIABLES 41
What Is Programming? 42
A Few Things to Note Before Getting Started 43
strict, warnings, and diagnostics 43
The my Function 43
Sigils 44
Identifiers 45
Scalars 46
Strings 47
Numbers 51
Arrays 53
Breaking Down the Code 54
Accessing Elements 55
Iterating over Arrays 58
Hashes 58
Accessing Elements 59
Iterating Over Hashes 60
Adding Data to Hashes 60
Slices 61
Array Slices 62
Hash Slices 62
Context 63
Scalar Context 63
List Context 64
Scope 67
my Variables 67
Package Variables 69
Strict, Warnings, and Diagnostics 72
strict 74
warnings 74
diagnostics 75
Working Without a Net 76
Perl’s Built-in Variables 78
$_ 78
%ENV 79
@ARGV 79
Other Special Variables 80
Summary 81
CHAPTER 4: WORKING WITH DATA 83
Using Scalars 84
Working with Strings 85
Using String Operators 94
Scalar::Util 97
Numeric Builtins 98
Bitwise Operators 103
Understanding Booleans 103
Assignment Operators 108
Precedence and Associativity 109
Array and List Functions 111
Built-in Array Functions 111
List::Util 116
Built-in Hash Functions 116
delete() 116
exists() 117
keys() 117
values() 117
each() 117
Scoping Keywords 119
my() 119
local() 119
our() 120
state() 120
Summary 121
CHAPTER 5: CONTROL FLOW 125
Using the if Statement 126
Understanding Basic Conditionals 126
else/elsif/unless 128
The Ternary Operator ?: 131
for/foreach loops 132
Arrays 132
Lists 135
C-Style 136
Using while/until Loops 142
Lists 143
last/next/redo/continue 144
Labels 146
Statement Modifiers 147
Types of Statement Modifiers 147
do while/do until 149
given/when 151...