Category Archives: 5.28

Use Unicode 10 in Perl v5.28

Perl v5.28 updates to Unicode 10. There are 8,518 new characters, 7,473 which are in the CJK extension. There are 56 new emojis. And, the Bitcoin symbol, ₿. It adds a T. rex, 🦖, but we’re still waiting for a raptor. To Perl they are just characters like any other so you don’t need anything […]

Perl v5.28 can delete key-value slices

Perl v5.20 introduced key-value slices that worked on hashes and arrays. You could extract values by their keys or indices as well as assigning to those. The key-value slice delete is way to extract the keys and values you want and delete them at the same time. You can destructively

Initialize array and hash variables with state

Perl v5.28 allows you to initialize array and hash variables that you declare with state. This is a feature a long time coming and that I’m quite happy as finally arrived. Since v5.10 and up to v5.26 you could only initialize a state variable if it was a scalar. You could declare a hash or […]

In-place editing gets safer in v5.28

In-place editing is getting much safer in v5.28. Before that, in rare circumstances it could lose data. You may have never noticed the problem and even with all the times I’ve explained it in a Perl class I haven’t really thought about it. This was first reported as early as December 2002 and after we […]

Beware of the removal of when in Perl v5.28

[Although I haven’t seen an official notice besides a git commit that reverts the changes, by popular outcry these changes won’t be in v5.28. It’s not that they won’t happen but they won’t be in v5.28. People who depend on Perl should stay vigilant. My advice in the first paragraph stands—change is coming and we […]

Perl v5.28 new features

Perl v5.28 has a few new features and several removals of old features that you shouldn’t have been using anyway (so I’m not going to mention them).

Deprecation warnings now tell you when the features will disappear

Perl v5.28 will have better deprecation warnings. Most of this I picked up from the lightning talk that Abigail gave at The Perl Conference.

Make bitwise operators always use numeric context

[This feature is no longer experimental, starting in v5.28. Declaring use 5.28 automatically enables them.] Most Perl operators force their context on the values. For example, the numeric addition operator, +, forces its values to be numbers. To “add” strings, you use a separate operator, the string concatenation operator, . (which looks odd at the […]