Perl 5.14 new features

The Perl 5 Porters released 5.14. By reading the perldelta51[34]* documentation, you can see what’s new in this maintenance version of Perl. David Golden, one of the Perl 5.13 release managers, put together what he’s calling the perldeltadelta, which is just the most interesting bits of the longish perl*delta files for Perl 5.13, the experimental track that led up to Perl 5.14. He’s covered most of the interesting bits. Continue reading “Perl 5.14 new features”

Use formats to create paginated, plaintext reports

Perl’s format feature allows you to easily create line-oriented text reports with pagination, and if that’s what you want, Perl is for you. This item is just an introduction. You can find the full details in perlform, and in future items. Continue reading “Use formats to create paginated, plaintext reports”

Temporarily remove hash keys or array elements with `delete local`

Perl 5.12 adds a feature that lets you locally delete a hash key or array element (refresh your memory of local with Item 43: Know the difference between my and local. This new feature allows you to temporarily prune a hash or an array: Continue reading “Temporarily remove hash keys or array elements with `delete local`”

Do you want extra Effective Perl in Safari Books?

We’re looking for some reader feedback. You can comment here, send us mail, reply on Twitter, skywrite your message in Chicago (please send us a link to that video in case we miss it), or come up to us at a conference.

We’re thinking about writing an extra, bonus chapter of Effective Perl Programming for Safari Books Online. We’re having fun providing lots of free, extra content on this website, but we thought we might do something nice for those you also paid to get online access to our book. Continue reading “Do you want extra Effective Perl in Safari Books?”

Implicitly turn on strictures with Perl 5.12

Perl 5.12 can turn on strict for you automatically, stealing a feature from Modern::Perl that takes away one line of boilerplate in your Perl programs and modules. We talk about strict in Item 3: Enable strictures to promote better coding. Similar to what we show in Item 2: Enable new Perl features when you need them, to turn strictures on automatically, you have to use use with a version of Perl 5.11.0 or later: Continue reading “Implicitly turn on strictures with Perl 5.12”

Turn off Perl 5.12 deprecation warnings, if you dare!

Perl 5.12 deprecates several features, for various reasons. Some of the features were always stupid, some need to make way for future development, and some are just too ornery to maintain. All of these are listed in the perldelta5120 documentation. The new thing, however, is that Perl 5.12 will warn you about these even if you don’t have warnings turned on. Consider this script full of Perl whoppers: Continue reading “Turn off Perl 5.12 deprecation warnings, if you dare!”

Match Unicode characters by property value

A Unicode character has properties; it knows things about itself. Perl v5.10 introduced a way to match a character that has certain properties that v5.10 supports. In some cases you can match a particular property value. Now v5.12 allows you can match any Unicode property by its value. The newly-supported ones include Numeric_Value and Age, for example:

\p{Numeric_Value: 1}
\p{Nv=7}
\p{Age: 3.0}

Continue reading “Match Unicode characters by property value”

Locate bugs with source control bisection

As you work in Perl you store each step in source control. When you finish a little bit of work, you commit your work. Ideally, every commit deals with one thing so you’re only introducing one logical change in each revision. Somewhere along the process, you might discover that something is not working correctly. You think that it used to work but you’re not sure where things went pear-shaped, perhaps because the bug seemingly deals with something that you weren’t working on. Continue reading “Locate bugs with source control bisection”

Perl Authors Night at Powell’s Technical Books

During OSCON, Joshua and I are taking part in the Perl Authors Night at Powell’s Technical Books on Tuesday, July 20 at 7 pm. Bring your copy of Effective Perl Programming for us to sign.

Other authors confirmed so far include:

  • chromatic (Modern Perl, Perl Testing: A Developer’s Notebook, Perl Hacks, Extreme Programming Pocket Guide)

  • brian d foy (Effective Perl Programming, Learning Perl, Intermediate Perl, Mastering Perl)

  • Joshua McAdams (Effective Perl Programming)

  • Curtis “Ovid” Poe (Perl Hacks)

  • Randal Schwartz (Programming perl (1st edition), Learning Perl, Intermediate Perl, Perls of Wisdom)

  • Peter Scott (Perl Medic, Perl Debugged, Perl Fundamentals (DVD))

Make sure that you’re going to Powell’s Technical Books is at 33 Northwest Park Avenue in Portland, and not one of their other Portland stores. You can take the MAX Green line (for free) from the Convention Center to NW 5th St and NW Couch St, then walk 4 blocks west to the store.