1234567

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.

chromatic

Since 1998, chromatic has helped kick off the Perl testing revolution; contributed to the PerlMonks community from its origins; and wrote, edited, and reviewed many books and articles. He’s contributed to Perl’s current release structure, as well as Moose, Catalyst, Mojolicious, and p5p. He first released Modern Perl to the community in 2010.

  • Preface
    • Running Modern Perl
    • Credits
  • The Perl Philosophy
    • Perldoc
    • Expressivity
    • Context
    • Implicit Ideas
  • Perl and Its Community
    • The CPAN
    • Community Sites
    • Development Sites
    • Events
    • IRC
  • The Perl Language
    • Names
    • Variables
    • Values
    • Control Flow
    • Scalars
    • Arrays
    • Hashes
    • Coercion
    • Packages
    • References
    • Nested Data Structures
  • Operators
    • Operator Characteristics
    • Operator Types
  • Functions
    • Declaring Functions
    • Invoking Functions
    • Function Parameters
    • Functions and Namespaces
    • Reporting Errors
    • Advanced Functions
    • Pitfalls and Misfeatures
    • Scope
    • Anonymous Functions
    • Closures
    • State versus Closures
    • State versus Pseudo-State
    • Attributes
    • AUTOLOAD
  • Regular Expressions and Matching
    • Literals
    • The qr// Operator and Regex Combinations
    • Quantifiers
    • Greediness
    • Regex Anchors
    • Metacharacters
    • Character Classes
    • Capturing
    • Grouping and Alternation
    • Other Escape Sequences
    • Assertions
    • Regex Modifiers
    • Smart Matching
  • Objects
    • Moose
    • Blessed References
    • Reflection
    • Advanced OO Perl
  • Style and Efficacy
    • Writing Maintainable Perl
    • Writing Idiomatic Perl
    • Writing Effective Perl
    • Exceptions
    • Pragmas
  • Managing Real Programs
    • Testing
    • Handling Warnings
    • Files
    • Modules
    • Distributions
    • The UNIVERSAL Package
    • Code Generation
    • Overloading
    • Taint
  • Perl Beyond Syntax
    • Idioms
    • Global Variables
  • What to Avoid
    • Barewords
    • Indirect Objects
    • Prototypes
    • Method-Function Equivalence
    • Automatic Dereferencing
    • Tie
  • Next Steps with Perl
    • Useful Core Modules
    • What’s Next?