PERL(1)
๐ PERL(1) โ Perl Programmers Reference Guide ๐
okay bestie, sit DOWN, we're reading the perl manpage together and honestly? it's giving main character energy. this is the manual page for perl โ The Perl 5 language interpreter ๐
โจ NAME โจ
perl โ The Perl 5 language interpreter. that's her. that's the whole vibe. ๐
๐ธ SYNOPSIS ๐ธ
like, here's how you summon her:
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 ]...
for the tea on all these options, run perldoc perlrun. go on, she won't bite ๐ซถ
๐ฆ GETTING HELP ๐ฆ
the perldoc program is literally your key to ALL the documentation that ships with Perl. and if you want even more docs, tutorials, and community support online, it's all at <https://www.perl.org/> โ no cap. โจ
if you're new here (welcome, bb ๐), start with running perldoc perlintro. it's a general intro for beginners and gives you the background you need to navigate the rest of Perl's extensive documentation. like, extensive extensive. run perldoc perldoc to learn more things you can do with perldoc.
and for ease of access, the Perl manual has been split up into several sections. let's get into it ๐
๐ Overview
perlโ Perl overview (this section, hiii you are 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
the lore. the archives. we stan a documented glow-up ๐
perlhistโ Perl history recordsperldeltaโ Perl changes since previous versionperl5321deltaโ 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
๐ 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 part 1 bestie ๐ซถ more is coming, don't go anywhere โ we're not even done ๐
๐ Language-Specific
Like, Perl speaks so many languages and it's giving polyglot royalty:
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
Whatever weird lil machine you're on, bestie, there's a page for that:
perlaixโ Perl notes for AIXperlamigaโ Perl notes for AmigaOSperlandroidโ Perl notes for Androidperlbs2000โ Perl notes for POSIX-BC BS2000perlcygwinโ Perl notes for Cygwinperldosโ Perl notes for DOSperlfreebsdโ Perl notes for FreeBSDperlhaikuโ Perl notes for Haikuperlhpuxโ Perl notes for HP-UXperlhurdโ Perl notes for Hurdperlirixโ Perl notes for Irixperllinuxโ Perl notes for Linuxperlmacosโ Perl notes for Mac OS (Classic)perlmacosxโ Perl notes for Mac OS Xperlnetwareโ Perl notes for NetWareperlopenbsdโ 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
These pages are literally just ghost stubs now, no cap โ the docs are gone but the names remain, like a haunted lil hallway:
perlbootperlbotperlrepositoryperltodoperltoocperltoot
Okay so if you're on a Debian system, heads up bestie: you gotta install the perl-doc package, because that's what has the majority of the standard Perl documentation in it, plus the perldoc program itself. Periodt.
There's also extensive additional documentation for Perl modules โ both the ones shipped with Perl and the third-party ones that are packaged up or locally installed. So much lore fr fr.
You should be able to view all of Perl's documentation with your man(1) program or with perldoc(1). ๐ซถ
But some docs are not available as man pages (rude, honestly), so if a cross-reference comes up empty when you hit it with man, try it with perldoc instead. perldoc can also take you directly to documentation for functions โ just use the -f switch. Want more helpful options? Run "perldoc --help" (or "perldoc perldoc" or "man perldoc") and it'll show you everything it's got. โจ
And in general? If something strange has gone wrong with your program and you're like "where do I even look ๐ญ" โ try making your code comply with use strict and use warnings. These will often point out exactly where the trouble is. Iconic behavior.
๐ 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. Glow-up of the century ngl.
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. Main character energy across every paradigm ๐
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. Stealing from the best is a compliment, bestie. ๐
โญ 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. (Yeah it's a redirect, go look there, iykyk.)
๐ AUTHOR
Larry Wall <larry@wall.org>, with the help of oodles of other folks. Absolute legends, all of them. ๐ซถ
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. Do it. For me. ๐ฅบ
The "use warnings" pragma produces some lovely diagnostics. 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. Yeah. Don't do that one.
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? Bestie. We mentioned it. We're mentioning it again. ๐ค
๐ BUGS
The behavior implied by the use warnings pragma is not mandatory. (Wild, I know.)
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>. Please include the config info, we're begging ๐
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. ๐
And that's the whole page, bestie!! ๐ This was perl version v5.34.0, dated 2026-09-03, and it's literally titled PERL(1). Go write something iconic. ๐โจ
๐ฆ where this page comes from
- ubuntu jammy: libperl5.34 5.34.0-3ubuntu1.9 ยท 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