掌握现代Perl:从零开始到高效编程

需积分: 10 3 下载量 106 浏览量 更新于2024-07-21 收藏 1.31MB PDF 举报
现代Perl("Modern_Perl_zh")是一本面向Perl初学者的经典教程,专为那些希望深入理解并掌握Perl这门通用编程语言的人设计。Perl起源于1987年,经历了多个迭代,从最初的简单脚本工具发展为功能强大的编程语言,尤其是在Perl5时期,它逐渐积累了一整套丰富的特性。 本书强调Perl5的强大功能尚未被许多现有的Perl5程序充分发掘,通过利用Perl5社区的创新成果,可以编写出更高效、简洁且易于维护的代码。"Modern Perl"的目标是教授读者如何像经验丰富的Perl开发者那样工作,这些开发者熟练地运用惯用语,频繁地从Comprehensive Perl Archive Network (CPAN)获取模块,以及在编程中融入独特的Perl风格。 书中的内容结构清晰,每个章节都以基础的Perl脚本开始,例如设置#!/usr/bin/perl的Shebang行,并引入"Modern::Perl"模块来提升代码质量。此外,书中还提供了使用Test::More等测试函数的示例,确保读者能够理解和实践良好的编程习惯。 书中示例代码假定读者使用的Perl版本至少为5.10,因为在5.10及以后的版本中,许多新功能和优化已经实现。然而,虽然大部分例子可以向下兼容到较早版本,但在Perl5.10.0之前运行可能会遇到一些限制。 "Modern Perl"是一本既适合Perl新手快速入门,又能帮助有经验的程序员提升编程技巧的实用指南,它将引领读者领略Perl语言的魅力,以及如何充分利用其强大的特性和生态系统来编写高效、优雅的代码。
2016-10-25 上传
A Perl expert can solve a problem in a few lines of well-tested code. Now you can unlock these powers for yourself. Modern Perl teaches you how Perl really works. It's the only book that explains Perl thoroughly, from its philosophical roots to the pragmatic decisions that help you solve real problems--and keep them solved. You'll understand how the language fits together and discover the secrets used by the global Perl community. This beloved guide is now completely updated for Perl 5.22. When you have to solve a problem now, reach for Perl. When you have to solve a problem right, reach for Modern Perl. Discover how to scale your skills from one-liners to asynchronous Unicode-aware web services and everything in between. Modern Perl will take you from novice to proficient Perl hacker. You'll see which features of modern Perl will make you more productive, and which features of this well-loved language are best left in the past. Along the way, you'll take advantage of Perl to write well-tested, clear, maintainable code that evolves with you. Learn how the language works, how to take advantage of the CPAN's immense trove of time-tested solutions, and how to write clear, concise, powerful code that runs everywhere. Specific coverage explains how to use Moose, how to write testable code, and how to deploy and maintain real-world Perl applications. This new edition covers the new features of Perl 5.20 and Perl 5.22, including all the new operators, standard library changes, bug and security fixes, and productivity enhancements. It gives you what you need to use the most up-to-date Perl most effectively, all day, every day. What You Need: Perl 5.16 or newer (Perl 5.20 or 5.22 preferred). Installation/upgrade instructions included. Table of Contents Chapter 1. The Perl Philosophy Chapter 2. Perl and Its Community Chapter 3. The Perl Language Chapter 4. Operators Chapter 5. Functions Chapter 6. Regular Expressions and Matching Chapter 7. Objects Chapter 8. Style and Efficacy Chapter 9. Managing Real Programs Chapter 10. Perl Beyond Syntax Chapter 11. What to Avoid Chapter 12. Next Steps with Perl