Perl v5.18 allows you to define named subroutines that exist only in the current lexical scope. These act (almost) just like the regular named subroutines that you already know about from Learning Perl, but also like the lexical variables that have limited effect. The problem is that the feature is almost irredeemably broken, which you’ll […]
Category Archives: 5.18
Not sure which loop you want to break out of? Perl v5.18 makes that easy with computed labels. The value you give next, last, and redo no longer has to be a literal. You could already do this with goto, but now you can give the loop controllers an expression.
Perl 5.18 provides a new way to introduce experimental features in a program, augmenting the feature pragma that v5.10 added. This change marks certain broken v5.10 features as experimental with an eye toward possible removal from the language. Smart matching in v5.10 led to several broken and conflated features. The given used a lexical version […]
Perl 5.18 is out and there are some major changes that you should know about before you upgrade. Most notably, some features from v5.10 are now marked experimental. If you use those features, you get warnings. You can download the Perl source from CPAN. For Windows, Strawberry Perl 5.18 is available now.
Up to v5.18, the vertical tab wasn’t part of the \s character class shortcut for ASCII whitespace. No one really knows why. It was curious trivia that I pointed out in Know your character classes under different semantics. Whitespace in ASCII, POSIX, and Unicode represented different sets. Perl whitespace was different from POSIX whitespace by […]