图书介绍

PERL语言入门 第7版 影印版【2025|PDF|Epub|mobi|kindle电子书版本百度云盘下载】

PERL语言入门 第7版 影印版
  • 兰德尔·L.施瓦茨著 著
  • 出版社: 南京:东南大学出版社
  • ISBN:9787564173724
  • 出版时间:2017
  • 标注页数:374页
  • 文件大小:42MB
  • 文件页数:390页
  • 主题词:

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

PERL语言入门 第7版 影印版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

1.Introduction1

Questions and Answers1

Is This the Right Book for You?1

What About the Exercises and Their Answers?2

What If I'm a Perl Course Instructor?3

What Does“Perl”Stand For?4

Why Did Larry Create Perl?4

Why Didn't Larry Just Use Some Other Language?4

Is Perl Easy or Hard?5

How Did Perl Get to Be So Popular?7

What's Happening with Perl Now?7

What's Perl Really Good For?7

What Is Perl Not Good For?8

How Can I Get Perl?8

What Is CPAN?9

Is There Any Kind of Support?9

What If I Find a Bug in Perl?10

How Do I Make a Perl Program?11

A Simple Program11

What's Inside That Program?13

How Do I Compile My Perl Program?15

A Whirlwind Tour of Perl16

Exercises17

2.Scalar Data19

Numbers19

All Numbers Have the Same Format Internally20

Integer Literals20

Nondecimal Integer Literals21

Floating-Point Literals21

Numeric Operators22

Strings23

Single-Quoted String Literals24

Double-Quoted String Literals24

String Operators25

Automatic Conversion Between Numbers and Strings26

Perl's Built-In Warnings27

Interpreting Nondecimal Numerals28

Scalar Variables29

Choosing Good Variable Names30

Scalar Assignment31

Compound Assignment Operators31

Output with print32

Interpolation of Scalar Variables into Strings32

Creating Characters by Code Point33

Operator Precedence and Associativity34

Comparison Operators36

The if Control Structure37

Boolean Values37

Getting User Input38

The chomp Operator39

The while Control Structure40

The undef Value40

The defined Function41

Exercises41

3.Lists and Arrays43

Accessing Elements of an Array44

Special Array Indices45

List Literals45

The qw Shortcut46

List Assignment47

The pop and push Operators49

The shift and unshift Operators49

The splice Operator50

Interpolating Arrays into Strings51

The foreach Control Structure52

Perl's Favorite Default:$53

The reverse Operator53

The sort Operator54

The each Operator54

Scalar and List Context55

Using List-Producing Expressions in Scalar Context56

Using Scalar-Producing Expressions in List Context58

Forcing Scalar Context58

<STDIN> in List Context58

Exercises59

4.Subroutines61

Defining a Subroutine61

Invoking a Subroutine62

Return Values62

Arguments64

Private Variables in Subroutines66

Variable-Length Parameter Lists67

A Better&max Routine67

Empty Parameter Lists68

Notes on Lexical(my)Variables69

The use strict Pragma70

The return Operator71

Omitting the Ampersand72

Nonscalar Return Values74

Persistent,Private Variables74

Subroutine Signatures76

Exercises78

5.Input and Output81

Input from Standard Input81

Input from the Diamond Operator83

The Double Diamond85

The Invocation Arguments85

Output to Standard Output86

Formatted Output with printf89

Arrays and printf91

Filehandles91

Opening a Filehandle93

Binmoding Filehandles96

Bad Filehandles96

Closing a Filehandle97

Fatal Errors with die97

Warning Messages with warn99

Automatically die-ing99

Using Filehandles100

Changing the Default Output Filehandle100

Reopening a Standard Filehandle101

Output with say102

Filehandles in a Scalar102

Exercises104

6.Hashes107

What Is a Hash?107

Why Use a Hash?109

Hash Element Access110

The Hash as a Whole111

Hash Assignment112

The Big Arrow113

Hash Functions114

The keys and values Functions114

The each Function115

Typical Use of a Hash116

The exists Function117

The delete Function117

Hash Element Interpolation118

The%ENV hash118

Exercises119

7.Regular Expressions121

Sequences121

Practice Some Patterns123

The Wildcard125

Quantifiers126

Grouping in Patterns130

Alternatives133

Character Classes134

Character Class Shortcuts135

Negating the Shortcuts137

Unicode Properties137

Anchors138

Word Anchors139

Exercises141

8.Matching with Regular Expressions143

Matches with m//143

Match Modifiers144

Case-Insensitive Matching with/i144

Matching Any Character with/s144

Adding Whitespace with/x145

Combining Option Modifiers146

Choosing a Character Interpretation146

Beginning and End-of-Line Anchors148

Other Options149

The Binding Operator=~149

The Match Variables150

The Persistence of Captures151

Noncapturing Parentheses152

Named Captures153

The Automatic Match Variables155

Precedence157

Examples of Precedence158

And There's More158

A Pattern Test Program159

Exercises159

9.Processing Text with Regular Expressions161

Substitutions with s///161

Global Replacements with/g162

Different Delimiters163

Substitution Modifiers163

The Binding Operator163

Nondestructive Substitutions163

Case Shifting164

Metaquoting166

The split Operator166

The join Function168

m//in List Context168

More Powerful Regular Expressions169

Nongreedy Quantifiers169

Fancier Word Boundaries170

Matching Multiple-Line Text172

Updating Many Files172

In-Place Editing from the Command Line174

Exercises176

10.More Control Structures177

The unless Control Structure177

The else Clause with unless178

The until Control Structure178

Statement Modifiers179

The Naked Block Control Structure180

The elsif Clause181

Autoincrement and Autodecrement182

The Value of Autoincrement182

The for Control Structure183

The Secret Connection Between foreach and for185

Loop Controls186

The last Operator186

The next Operator187

The redo Operator188

Labeled Blocks189

The Conditional Operator190

Logical Operators191

The Value of a Short-Circuit Operator192

The defined-or Operator193

Control Structures Using Partial-Evaluation Operators194

Exercises196

11.Perl Modules197

Finding Modules197

Installing Modules198

Using Your Own Directories199

Using Simple Modules201

The File::Basename Module202

Using Only Some Functions from a Module203

The File::Spec Module204

Path::Class205

Databases and DBI205

Dates and Times206

Exercises207

12.File Tests209

File Test Operators209

Testing Several Attributes of the Same File213

Stacked File Test Operators214

The stat and lstat Functions216

The localtime Function217

Bitwise Operators218

Using Bitstrings219

Exercises222

13.Directory Operations223

The Current Working Directory223

Changing the Directory224

Globbing225

An Alternate Syntax for Globbing227

Directory Handles228

Manipulating Files and Directories229

Removing Files230

Renaming Files231

Links and Files232

Making and Removing Directories237

Modiffing Permissions239

Changing Ownership239

Changing Timestamps240

Exercises240

14.Strings and Sorting243

Finding a Substring with index243

Manipulating a Substring with substr245

Formatting Data with sprintf246

Using sprintf with“Money Numbers”247

Advanced Sorting248

Sorting a Hash by Value252

Sorting by Multiple Keys253

Exercises254

15.Process Management255

The system Function255

Avoiding the Shell258

The Environment Variables260

The exec Function261

Using Backquotes to Capture Output262

Using Backquotes in a List Context264

External Processes with IPC::System::Simple266

Processes as Filehandles267

Getting Down and Dirty with Fork269

Sending and Receiving Signals270

Exercises273

16.Some Advanced Perl Techniques275

Slices275

Array Slice277

Hash Slice279

Key-Value Slices280

Trapping Errors281

Using eval281

More Advanced Error Handling285

Picking Items from a List with grep287

Transforming Items from a List with map288

Fancier List Utilities289

Exercises291

A.Exercise Answers293

B.Beyond the Llama329

C.A Unicode Primer339

D.Experimental Features349

Index357

热门推荐