As of version 5.10, Perl supports features to selectively enhance the syntax and semantics of the language. Features can be enabled with use feature
and disabled with no feature,
see the section Pragmatic Modules.
Feature | Perl | Description | Page |
---|---|---|---|
say | 5.10 | Enables the keyword say. | |
state | 5.10 | Enables the keyword state. | |
switch | 5.10 | Enables the keywords given, when, break, and default. | |
unicode_strings | 5.12 | Enables Unicode semantics in all string operations. | |
:5.10 | 5.10 | All 5.10 features. | |
:5.12 | 5.12 | All 5.10 and 5.12 features. | |
:5.14 | 5.14 | All 5.10, 5.12 and 5.14 features. |
Feature bundles like :5.14
provide a quick means to get a fully featured Perl, although it is easier to automatically enable version dependent features with:
use 5.14.0;