PERL(1)
๐ PERL(1) ๐ โ the Perl Programmers Reference Guide
okay so bestie, welcome to PERL(1), aka the big one, aka the man page for the Perl 5 language interpreter, straight out of the Perl Programmers Reference Guide. it's giving legendary. it's giving ancient. it's giving literally runs half the internet. let's get into it ๐
โจ NAME โจ
perl โ The Perl 5 language interpreter ๐ช
๐ธ SYNOPSIS ๐ธ
like, here's the whole vibe of how you call it:
perl [ -sTtuUWX ] [ -hv ] [ -V[:configvar] ]
[ -cw ] [ -d[t][:debugger] ] [ -D[number/list] ]
[ -pna ] [ -Fpattern ] [ -l[octal] ] [ -0[octal/hexadecimal] ]
[ -Idir ] [ -m[-]module ] [ -M[-]'module...' ] [ -f ]
[ -C [number/list] ] [ -S ] [ -x[dir] ]
[ -i[extension] ]
[ [-e|-E] 'command' ] [ -- ] [ programfile ] [ argument ]...
okay so that's a LOT of little letters, and every single one of them matters. if you want the full tea on what they all do, run:
perldoc perlrun
that's your girl for every option and its lore. ๐
๐ซถ GETTING HELP ๐ซถ
so the perldoc program is your โจmain characterโจ access point to all the documentation that ships with Perl. and if you want even more docs, tutorials, and community support, it's all online at <https://www.perl.org/>. no cap. ๐
if you're brand new to Perl, bestie, start here: run perldoc perlintro. it's the general intro for beginners, and it gives you the background you need to actually navigate the rest of Perl's extensive (read: absolutely enormous, iconic, intimidating) documentation. and run perldoc perldoc to learn all the other cute things you can do with perldoc. ๐
and for ease of access, the Perl manual has been split up into several sections. here's the whole map:
๐ Overview
perlโ Perl overview (this section, hi, you're here ๐)perlintroโ Perl introduction for beginnersperlrunโ Perl execution and optionsperltocโ Perl documentation table of contents
๐ง Tutorials
perlreftutโ Perl references short introductionperldscโ Perl data structures introperllolโ Perl data structures: arrays of arraysperlrequickโ Perl regular expressions quick startperlretutโ Perl regular expressions tutorialperlootutโ Perl OO tutorial for beginnersperlperfโ Perl Performance and Optimization Techniquesperlstyleโ Perl style guideperlcheatโ Perl cheat sheetperltrapโ Perl traps for the unwaryperldebtutโ Perl debugging tutorialperlfaqโ Perl frequently asked questionsperlfaq1โ General Questions About Perlperlfaq2โ Obtaining and Learning about Perlperlfaq3โ Programming Toolsperlfaq4โ Data Manipulationperlfaq5โ Files and Formatsperlfaq6โ Regexesperlfaq7โ Perl Language Issuesperlfaq8โ System Interactionperlfaq9โ Networking
๐ Reference Manual
perlsynโ Perl syntaxperldataโ Perl data structuresperlopโ Perl operators and precedenceperlsubโ Perl subroutinesperlfuncโ Perl built-in functionsperlopentutโ Perlopen()tutorialperlpacktutโ Perlpack()andunpack()tutorial
perlpodโ Perl plain old documentationperlpodspecโ Perl plain old documentation format specificationperldocstyleโ Perl style guide for core docsperlpodstyleโ Perl POD style guideperldiagโ Perl diagnostic messagesperldeprecationโ Perl deprecationsperllexwarnโ Perl warnings and their controlperldebugโ Perl debuggingperlvarโ Perl predefined variablesperlreโ Perl regular expressions, the rest of the storyperlrebackslashโ Perl regular expression backslash sequencesperlrecharclassโ Perl regular expression character classesperlrerefโ Perl regular expressions quick referenceperlrefโ Perl references, the rest of the storyperlformโ Perl formatsperlobjโ Perl objectsperltieโ Perl objects hidden behind simple variablesperldbmfilterโ Perl DBM filters
perlipcโ Perl interprocess communicationperlforkโ Perlfork()informationperlnumberโ Perl number semanticsperlthrtutโ Perl threads tutorialperlportโ Perl portability guideperllocaleโ Perl locale supportperluniintroโ Perl Unicode introductionperlunicodeโ Perl Unicode supportperlunicookโ Perl Unicode cookbookperlunifaqโ Perl Unicode FAQperlunipropsโ Index of Unicode properties in Perlperlunitutโ Perl Unicode tutorialperlebcdicโ Considerations for running Perl on EBCDIC platformsperlsecโ Perl securityperlsecpolicyโ Perl security report handling policyperlmodโ Perl modules: how they workperlmodlibโ Perl modules: how to write and useperlmodstyleโ Perl modules: how to write modules with styleperlmodinstallโ Perl modules: how to install from CPANperlnewmodโ Perl modules: preparing a new module for distributionperlpragmaโ Perl modules: writing a user pragmaperlutilโ utilities packaged with the Perl distributionperlfilterโ Perl source filtersperldtraceโ Perl's support for DTraceperlglossaryโ Perl Glossary
๐ง Internals and C Language Interface
perlembedโ Perl ways to embed perl in your C or C++ applicationperldebgutsโ Perl debugging guts and tipsperlxstutโ Perl XS tutorialperlxsโ Perl XS application programming interfaceperlxstypemapโ Perl XS C/Perl type conversion toolsperlclibโ Internal replacements for standard C library functionsperlgutsโ Perl internal functions for those doing extensionsperlcallโ Perl calling conventions from Cperlmroapiโ Perl method resolution plugin interfaceperlreapiโ Perl regular expression plugin interfaceperlregutsโ Perl regular expression engine internalsperlapiโ Perl API listing (autogenerated)perlinternโ Perl internal functions (autogenerated)perliolโ C API for Perl's implementation of IO in Layersperlapioโ Perl internal IO abstraction interfaceperlhackโ Perl hackers guideperlsourceโ Guide to the Perl source treeperlinterpโ Overview of the Perl interpreter source and how it worksperlhacktutโ Walk through the creation of a simple C code patchperlhacktipsโ Tips for Perl core C code hackingperlpolicyโ Perl development policiesperlgovโ Perl Rules of Governanceperlgitโ Using git with the Perl repository
๐ History
okay this part is the โจreceiptsโจ section, aka every single version of Perl ever, documented for eternity:
perlhistโ Perl history recordsperldeltaโ Perl changes since previous versionperl5341deltaโ Perl changes in version 5.34.1perl5340deltaโ Perl changes in version 5.34.0perl5321deltaโ Perl changes in version 5.32.1perl5320deltaโ Perl changes in version 5.32.0perl5303deltaโ Perl changes in version 5.30.3perl5302deltaโ Perl changes in version 5.30.2perl5301deltaโ Perl changes in version 5.30.1perl5300deltaโ Perl changes in version 5.30.0perl5283deltaโ Perl changes in version 5.28.3perl5282deltaโ Perl changes in version 5.28.2perl5281deltaโ Perl changes in version 5.28.1perl5280deltaโ Perl changes in version 5.28.0perl5263deltaโ Perl changes in version 5.26.3perl5262deltaโ Perl changes in version 5.26.2perl5261deltaโ Perl changes in version 5.26.1perl5260deltaโ Perl changes in version 5.26.0perl5244deltaโ Perl changes in version 5.24.4perl5243deltaโ Perl changes in version 5.24.3perl5242deltaโ Perl changes in version 5.24.2perl5241deltaโ Perl changes in version 5.24.1perl5240deltaโ Perl changes in version 5.24.0perl5224deltaโ Perl changes in version 5.22.4perl5223deltaโ Perl changes in version 5.22.3perl5222deltaโ Perl changes in version 5.22.2perl5221deltaโ Perl changes in version 5.22.1perl5220deltaโ Perl changes in version 5.22.0perl5203deltaโ Perl changes in version 5.20.3perl5202deltaโ Perl changes in version 5.20.2perl5201deltaโ Perl changes in version 5.20.1perl5200deltaโ Perl changes in version 5.20.0perl5184deltaโ Perl changes in version 5.18.4perl5182deltaโ Perl changes in version 5.18.2perl5181deltaโ Perl changes in version 5.18.1perl5180deltaโ Perl changes in version 5.18.0perl5163deltaโ Perl changes in version 5.16.3perl5162deltaโ Perl changes in version 5.16.2perl5161deltaโ Perl changes in version 5.16.1perl5160deltaโ Perl changes in version 5.16.0perl5144deltaโ Perl changes in version 5.14.4perl5143deltaโ Perl changes in version 5.14.3perl5142deltaโ Perl changes in version 5.14.2perl5141deltaโ Perl changes in version 5.14.1perl5140deltaโ Perl changes in version 5.14.0perl5125deltaโ Perl changes in version 5.12.5perl5124deltaโ Perl changes in version 5.12.4perl5123deltaโ Perl changes in version 5.12.3perl5122deltaโ Perl changes in version 5.12.2perl5121deltaโ Perl changes in version 5.12.1perl5120deltaโ Perl changes in version 5.12.0perl5101deltaโ Perl changes in version 5.10.1perl5100deltaโ Perl changes in version 5.10.0perl589deltaโ Perl changes in version 5.8.9perl588deltaโ Perl changes in version 5.8.8perl587deltaโ Perl changes in version 5.8.7perl586deltaโ Perl changes in version 5.8.6perl585deltaโ Perl changes in version 5.8.5perl584deltaโ Perl changes in version 5.8.4perl583deltaโ Perl changes in version 5.8.3perl582deltaโ Perl changes in version 5.8.2perl581deltaโ Perl changes in version 5.8.1perl58deltaโ Perl changes in version 5.8.0perl561deltaโ Perl changes in version 5.6.1perl56deltaโ Perl changes in version 5.6perl5005deltaโ Perl changes in version 5.005perl5004deltaโ Perl changes in version 5.004
like, that's sixty-something version docs. it's giving archival queen. don't skip them, they're history ๐
๐ Miscellaneous
perlbookโ Perl book informationperlcommunityโ Perl community informationperldocโ Look up Perl documentation in Pod formatperlexperimentโ A listing of experimental features in Perlperlartisticโ Perl Artistic Licenseperlgplโ GNU General Public License
and that's the map, bestie. ๐ more coming in part 2, don't go anywhere ๐
๐ Language-Specific ๐ธ
These are the localized perldoc pages, for when English isn't the vibe:
perlcnโ Perl for Simplified Chinese (in UTF-8)perljpโ Perl for Japanese (in EUC-JP)perlkoโ Perl for Korean (in EUC-KR)perltwโ Perl for Traditional Chinese (in Big5)
๐ฅ๏ธ Platform-Specific โจ
Every OS has its own little lore drop:
perlaixโ Perl notes for AIXperlamigaโ Perl notes for AmigaOSperlandroidโ Perl notes for Androidperlbs2000โ Perl notes for POSIX-BC BS2000perlcygwinโ Perl notes for Cygwinperlfreebsdโ Perl notes for FreeBSDperlhaikuโ Perl notes for Haikuperlhpuxโ Perl notes for HP-UXperlhurdโ Perl notes for Hurdperlirixโ Perl notes for Irixperllinuxโ Perl notes for Linuxperlmacosxโ Perl notes for Mac OS Xperlopenbsdโ Perl notes for OpenBSDperlos2โ Perl notes for OS/2perlos390โ Perl notes for OS/390perlos400โ Perl notes for OS/400perlplan9โ Perl notes for Plan 9perlqnxโ Perl notes for QNXperlriscosโ Perl notes for RISC OSperlsolarisโ Perl notes for Solarisperlsynologyโ Perl notes for Synologyperltru64โ Perl notes for Tru64perlvmsโ Perl notes for VMSperlvosโ Perl notes for Stratus VOSperlwin32โ Perl notes for Windows
๐ป Stubs for Deleted Documents ๐ชฆ
RIP to these, they're just placeholders now, no content bestie:
perlbootperlbotperlrepositoryperltodoperltoocperltoot
On Debian systems, you need to install the perl-doc package which contains the majority of the standard Perl documentation and the perldoc program.
There's also SO much extra documentation for Perl modules out there โ both the ones distributed with Perl and third-party modules that are packaged or locally installed. The library is stacked, no cap. ๐
You should be able to view Perl's documentation with your man(1) program or perldoc(1).
Some documentation is not available as man pages, so if a cross-reference is not found by man, try it with perldoc. Perldoc can also take you directly to documentation for functions (with the -f switch). See perldoc --help (or perldoc perldoc or man perldoc) for other helpful options perldoc has to offer. It's giving personal tour guide fr. ๐ซถ
In general, if something strange has gone wrong with your program and you're not sure where you should look for help, try making your code comply with use strict and use warnings. These will often point out exactly where the trouble is. They're literally the group chat that tells you what you did wrong. ๐ญ
๐ฆ DESCRIPTION ๐ฆ
Perl officially stands for Practical Extraction and Report Language, except when it doesn't. ๐
Perl was originally a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It quickly became a good language for many system management tasks. Over the years, Perl has grown into a general-purpose programming language. It's widely used for everything from quick "one-liners" to full-scale application development.
The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). It combines (in the author's opinion, anyway) some of the best features of sed, awk, and sh, making it familiar and easy to use for Unix users to whip up quick solutions to annoying problems. Its general-purpose programming facilities support procedural, functional, and object-oriented programming paradigms, making Perl a comfortable language for the long haul on major projects, whatever your bent.
Perl's roots in text processing haven't been forgotten over the years. It still boasts some of the most powerful regular expressions to be found anywhere, and its support for Unicode text is world-class. It handles all kinds of structured text, too, through an extensive collection of extensions. Those libraries, collected in the CPAN, provide ready-made solutions to an astounding array of problems. When they haven't set the standard themselves, they steal from the best -- just like Perl itself.
๐ AVAILABILITY ๐
Perl is available for most operating systems, including virtually all Unix-like platforms. See "Supported Platforms" in perlport for a listing.
๐ฟ ENVIRONMENT ๐ฟ
See "ENVIRONMENT" in perlrun.
๐ AUTHOR ๐
Larry Wall <larry@wall.org>, with the help of oodles of other folks.
If your Perl success stories and testimonials may be of help to others who wish to advocate the use of Perl in their applications, or if you wish to simply express your gratitude to Larry and the Perl developers, please write to perl-thanks@perl.org .
๐ FILES ๐
"@INC" locations of perl libraries
"@INC" above is a reference to the built-in variable of the same name; see perlvar for more information.
๐ SEE ALSO ๐
https://www.perl.org/โ the Perl homepagehttps://www.perl.com/โ Perl articleshttps://www.cpan.org/โ the Comprehensive Perl Archivehttps://www.pm.org/โ the Perl Mongers
๐ฅ DIAGNOSTICS ๐ฅ
Using the use strict pragma ensures that all variables are properly declared and prevents other misuses of legacy Perl features. These are enabled by default within the scope of use v5.12 (or higher).
The use warnings pragma produces some lovely diagnostics. It is enabled by default when you say use v5.35 (or higher). One can also use the -w flag, but its use is normally discouraged, because it gets applied to all executed Perl code, including that not under your control.
Bestie, the -w flag is the messy ex you keep going back to โ normally discouraged, okay? ๐ฉ
See perldiag for explanations of all Perl's diagnostics. The use diagnostics pragma automatically turns Perl's normally terse warnings and errors into these longer forms.
Compilation errors will tell you the line number of the error, with an indication of the next token or token type that was to be examined. (In a script passed to Perl via -e switches, each -e is counted as one line.)
Setuid scripts have additional constraints that can produce error messages such as "Insecure dependency". See perlsec.
Did we mention that you should definitely consider using the use warnings pragma? ๐ญ (we did. we're saying it again. it's iconic.)
๐ BUGS ๐
The behavior implied by the use warnings pragma is not mandatory.
Perl is at the mercy of your machine's definitions of various operations such as type casting, atof(), and floating-point output with sprintf().
If your stdio requires a seek or eof between reads and writes on a particular stream, so does Perl. (This doesn't apply to sysread() and syswrite().)
While none of the built-in data types have any arbitrary size limits (apart from memory size), there are still a few arbitrary limits: a given variable name may not be longer than 251 characters. Line numbers displayed by diagnostics are internally stored as short integers, so they are limited to a maximum of 65535 (higher numbers usually being affected by wraparound).
You may submit your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, or by perl -V) to <https://github.com/Perl/perl5/issues>.
Perl actually stands for Pathologically Eclectic Rubbish Lister, but don't tell anyone I said that. ๐คซ
โญ NOTES โญ
The Perl motto is "There's more than one way to do it." Divining how many more is left as an exercise to the reader.
The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why.
That's the whole page bestie!! ๐ This was perl version v5.36.0, dated 2026-09-29, and it lives at PERL(1). Go forth and write something unhinged and beautiful, ily ๐โจ
๐ฆ where this page comes from
- debian bookworm: perl-base 5.36.0-7+deb12u4 ยท GPL-1.0-or-later OR Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms