English(3pm)
β¨ English(3pm) β¨
Okay bestie, so this is the page for English, part of the Perl Programmers Reference Guide, and it's literally about giving cute names to the ugly punctuation variables in Perl. No cap, it's a vibe.
πΈ NAME πΈ
English β use nice English (or awk) names for ugly punctuation variables
π SYNOPSIS π
use English;
use English qw( -no_match_vars ) ; # Avoids regex performance
# penalty in perl 5.18 and
# earlier
...
if ($ERRNO =~ /denied/) { ... }
π DESCRIPTION π
So this module is literally just aliases for the built-in variables whose names nobody wants to read, iykyk. Like, why are we out here using $! and $/ when we could be using actual words? Main character energy only.
Fair warning though: variables with side-effects that get triggered just by accessing them (like $0) will still be affected. The vibe stays the same, bestie, we're just changing the name tag.
For those variables that have an awk version, both long and short English alternatives are provided. For example, the $/ variable can be referred to either $RS or $INPUT_RECORD_SEPARATOR if you are using the English module. Obsessed with the flexibility, honestly.
See perlvar for a complete list of these. It's giving reference material, but like, useful.
π₯ PERFORMANCE π₯
NOTE: This was fixed in perl 5.20. Mentioning these three variables no longer makes a speed difference. This section still applies if your code is to run on perl 5.18 or earlier.
Okay so this is the important part, bestie. This module can provoke sizeable inefficiencies for regular expressions, due to unfortunate implementation details. Not me crying over regex performance π. If performance matters in your application and you don't need $PREMATCH, $MATCH, or $POSTMATCH, try doing:
use English qw( -no_match_vars ) ;
Periodt. It is especially important to do this in modules to avoid penalizing all applications which use them. Like, don't be the reason everyone else's code is slow, that's not the vibe. π«Ά
That's the whole page, bestie! Stay slay, keep your variable names readable, and remember: performance matters, especially if you're on perl 5.18 or earlier. π β¨
perl v5.42.3 β 2026-11-03 β English(3pm) π¦
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms