Perl语言入门(第六版)(影印版)

Perl语言入门(第六版)(影印版)

 

基本信息

http://product.china-pub.com/199051

 

内容简介

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

目录

《perl语言入门(第六版)(影印版)》
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-lng
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


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Perl语言入门第七》是一本介绍Perl编程语言入门教程。Perl是一种通用脚本语言,可用于文本处理、系统管理和网络编程等多个领域。 本书首先介绍了Perl语言的基本概念和语法规则,包括变量、数据类型、运算符、控制结构等。读者可以通过实例代码和练习来巩固对这些知识的理解和掌握。 接下来,本书详细介绍了Perl的字符串处理、正则表达式和文件操作等常用特性。Perl在文本处理方面有着强大的功能,例如字符串的拼接、分割、替换和匹配等,能够帮助开发人员高效地处理文本数据。 此外,本书还介绍了Perl模块的使用方法和编程技巧。Perl模块是一些预定义的函数和变量集合,可以提供额外的功能和功能扩展。通过学习模块的使用,读者能够加深对Perl语言的理解,并能够更加高效地编写程序。 最后,本书还通过实例和项目演练,向读者展示了如何将Perl应用于实际开发中。这些实例涵盖了文件处理、网络编程、系统管理和Web开发等多个领域,帮助读者将所学知识转化为实际应用能力。 总之,《Perl语言入门第七》是一本全面介绍Perl语言入门教材。通过学习本书,读者可以系统地了解Perl的基本概念和语法规则,掌握Perl在文本处理和系统编程方面的强大功能,并能够将所学知识应用于实际开发中。无论是初学者还是有一定编程经验的开发人员,都可以通过本书打下坚实的Perl编程基础。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值