Perl语言入门

Perl语言入门

(美) 施瓦茨 (Schwartz,R.L.) , (美) 福瓦 (Foy,B.D.) , (美) 菲尼克斯 (Phoenix,T.) , 著

出版社:东南大学出版社

年代:2011

定价:69.0

书籍简介:

Perl能在绝大多数平台上完成几乎所有任务,不管是简单的修修补补,还是大型完备的网络应用。本书从最基础的开始教起,然后逐渐深入,让你慢慢能够自行编写多至128行的程序——如今90%的Perl程序差不多都是这般大小。本书每章都包含若干习题,帮助巩固消化刚学到的知识。也许其他书籍只是想着灌输Perl编程的条条框框,但本书不同,我们希望把你培养成一名真正的Perl程序员。

作者介绍:

Randal L. Schwartz is a two-decade veteran of the software industry. He is skilled in software design, system administration, security, technical writing, and training. Randal has coauthored the "must-have" standards: Programming Perl, Learning Perl, and Learning Perl on Win32 Systems (all from O'Reilly); and Effective Perl Programming(Addison-Wesley). He is also a regular columnist for WebTechniques, Performance-Computing, SysAdmin, and Linux Magazine. He is also a frequent contributor to the Perl newsgroups, and has moderated comp.lang.perl.announce since its inception. His offbeat humor and technical mastery have reached legendary proportions worldwide (but he probably started some of those legends himself). Randal's desire to gfve back to the Perl community inspired him to help create and provide initial funding for The Perllnstitute. He is also a founding board member of the Perl Mongers (perl.org), the worldwide Perl grassroots advocacy organization. Since 1985, Randal has owned and operated Stonehenge Consulting Services, Inc. Randal can be reached for comment at merlyn@stonehenge.com, and welcomes questions on Perl and other related topics.

书籍目录:

preface

1. Introduction

Questions and answers

Is this the right book for you?

why are there so many footnotes?

what about the exercises and their answers?

what do those numbers mean at the start of the exercise?

what if I'm a peri course instructor?

what does "peri" stand for?

why did larry create perl?

why didn't larry just use some other language?

is peri easy or hard?

how did peri get to be so popular?

what's happening with peri now?

what's peri really good for?

what is peri not good for?

how can I get peri?

what is cpan?

how can i get support for perl?

Are there any other kinds of support?

what if i find a bug in peri?

how do i make a perl program?

a simple program

what's inside that program?

how do i compile my peri program?

a whirlwind tour of peri

exercises

2. Scalar Data

numbers

all numbers have the same format internally

floating-point literals

integer literals

nondecimal integer literals

numeric operators

strings

single-quoted string literals

double-quoted string literals

string operators

automatic conversion between numbers and strings

perl's built-in warnings

scalar variables

choosing good variable names

scalar assignment

binary assignment operators

output with print

interpolation of scalar variables into strings

creating characters by code point

operator precedence and associativity

comparison operators

the if control structure

boolean values

getting user input

the chomp operator

the while control structure

the undef value

the defined function

exercises

3. lists and arrays

accessing elements of an array

special array indices

list literals

the qw shortcut

list assignment

the pop and push operators

the shift and unshift operators

the splice operator

interpolating arrays into strings

the foreach control structure

perl's favorite default

the reverse operator

the sort operator

the each operator

scalar and list context

using list-producing expressions in scalar context

using scalar-producing expressions in list context

forcing scalar context

stdin in list context

exercises

4. subroutines

defining a subroutine

invoking a subroutine

return values

arguments

private variables in subroutines

variable-length parameter lists

a better max routine

empty parameter lists

notes on lexical (my) variables

the use strict pragma

the return operator

omitting the ampersand

non-scalar return values

persistent, private variables

exercises

5. input and output

input from standard input

input from the diamond operator

the invocation arguments

output to standard output

formatted output with printf

arrays and printf

filehandles

opening a filehandle

binmoding filehandles

bad filehandles

closing a filehandle

fatal errors with die

warning messages with warn

automatically die-ing

using filehandles

changing the default output filehandle

reopening a standard filehandle

output with say

filehandles in a scalar

exercises

6. hashes

what is a hash?

why use a hash?

hash element access

the hash as a whole

hash assignment

the big arrow

hash functions

the keys and values functions

the each function

typical use of a hash

the exists function

the delete function

hash element interpolation

the %env hash

exercises

7. In the world of regular expressions

what are regular expressions?

using simple patterns

unicode properties

about metacharacters

simple quantifiers

grouping in patterns

alternatives

character classes

character class shortcuts

negating the shortcuts

exercises

8. Matching with regular expressions

matches with m//

match modifiers

case-insensitive matching with/i

matching any character with/s

adding whitespace with/x

combining option modifiers

choosing a character interpretation

other options

anchors

word anchors

the binding operator =~

interpolating into patterns

the match variables

the persistence of captures

noncapturing parentheses

named captures

the automatic match variables

general quantifiers

precedence

examples of precedence

and there's more

a pattern test program

exercises

9. processing text with regular expressions

substitutions with s///

global replacements with/g

different delimiters

substitution modifiers

the binding operator

nondestructive substitutions

case shifting

the split operator

the join function

m//in list context

more powerful regular expressions

nongreedy quantifiers

matching multiple-line text

updating many files

in-place editing from the command line

exercises

10. more control structures

the unless control structure

the else clause with unless

the until control structure

expression modifiers

the naked block control structure

the elsif clause

autoincrement and autodecrement

the value of autoincrement

the for control structure

the secret connection between foreach and for

loop controls

the last operator

the next operator

the redo operator

labeled blocks

the conditional operator ?

logical operators

the value of a short circuit operator

the defined-or operator

control structures using partial-evaluation operators

exercises

11. peri modules

finding modules

installing modules

using your own directories

using simple modules

the file::basename module

using only some functions from a module

the file::spec module

path::class

cgi.pm

databases and dbi

dates and times

exercises

12. file tests

file test operators

testing several attributes of the same file

stacked file test operators

the stat and lstat functions

the localtime function

bitwise operators

using bitstrings

exercises

13. 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

exercises

14. strings and sorting

finding a substring with index

manipulating a substring with substr

formatting data with sprintf

using sprintf with "money numbers"

interpreting non-decimal numerals

advanced sorting

sorting a hash by value

sorting by multiple keys

exercises

15. smart matching and given-when

the smart match operator

smart match precedence

the given statement

dumb matching

using when with many items

exercises

16. process management

the system function

avoiding the shell

the environment variables

the exec function

using backquotes to capture output

using backquotes in a list context

external processes with ipc::system::simple

processes as filehandles

getting down and dirty with fork

sending and receiving signals

exercises

17. some advanced peri techniques

slices

array slice

hash slice

trapping errors

using eval

more advanced error handling

autodie

picking items from a list with grep

transforming items from a list with map

fancier list utilities

exercises

a. exercise answers

b. beyond the llama

c. a unicode primer

index

内容摘要:

如果刚开始学习perl这门语言,那么《Perl 语言入门(第6版)(影印版)》就是你所需要的——不管你是一名程序员,还是系统管理员,抑或是网络黑客。这本书被整整两代perl用户昵称为“小骆驼书”,本书根据作者从1991年开始的教学经验积累汇聚而成,多年来十分畅销。此次第六版涵盖了最新的perl 5.14版本的变化。
perl能在绝大多数平台上完成几乎所有任务,不管是简单的修修补补,还是大型完备的网络应用。本书从最基础的开始教起,然后逐渐深入,让你慢慢能够自行编写多至128行的程序——如今90%的perl程序差不多都是这般大小。本书每章都包含若干习题,帮助巩固消化刚学到的知识。也许其他书籍只是想着灌输perl编程的条条框框,但本书不同,我们希望把你培养成一名真正的perl程序员。

书籍规格:

书籍详细信息
书名Perl语言入门站内查询相似图书
9787564130848
如需购买下载《Perl语言入门》pdf扫描版电子书或查询更多相关信息,请直接复制isbn,搜索即可全网搜索该ISBN
出版地南京出版单位东南大学出版社
版次影印本印次1
定价(元)69.0语种英文
尺寸24 × 17装帧平装
页数印数

书籍信息归属:

Perl语言入门是东南大学出版社于2011.11出版的中图分类号为 TP312 的主题关于 Perl语言-程序设计-英文 的书籍。