PERL(1)
๐ perl ๐
okay so bestie, welcome to the Perl 5 language interpreter โจ this is the main character of the whole Perl universe, and yes it's a LOT, but we're gonna get through it together, no cap.
โจ NAME โจ
perl โ The Perl 5 language interpreter ๐
๐ SYNOPSIS ๐
here's the vibe check, the whole menu of flags, literally all of 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 ]...
want the tea on every single one of these options? run perldoc perlrun bestie, that's where it all lives ๐ซถ
๐ฆ GETTING HELP ๐ฆ
perldoc is the program that hands you ALL the documentation that ships with Perl. And if you want even more docs, tutorials, and actual community support, it's all online at <https://www.perl.org/> ๐
new to Perl? start here: run perldoc perlintro โ it's the beginner-friendly general intro and gives you the background so you can actually navigate the rest of Perl's extensive (read: enormous) documentation without spiraling ๐ญ. And run perldoc perldoc to learn all the extra cute stuff you can do with perldoc โจ
also, because nobody wants to scroll forever, the Perl manual got split up into several sections. iconic organisational behaviour tbh ๐
Overview
perlโ Perl overview (this section) ๐perlintroโ Perl introduction for beginners ๐ฑperlrunโ Perl execution and options ๐perltocโ Perl documentation table of contents ๐
Tutorials
perlreftutโ Perl references short introduction ๐perldscโ Perl data structures intro ๐งฑperllolโ Perl data structures: arrays of arrays ๐ชperlrequickโ Perl regular expressions quick start โกperlretutโ Perl regular expressions tutorial ๐perlootutโ Perl OO tutorial for beginners ๐perlperfโ Perl Performance and Optimization Techniques ๐perlstyleโ Perl style guide ๐perlcheatโ Perl cheat sheet ๐perltrapโ Perl traps for the unwary ๐perldebtutโ Perl debugging tutorial ๐perlfaqโ Perl frequently asked questions โperlfaq1โ 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 syntax โ๏ธperldataโ Perl data structures ๐๏ธperlopโ Perl operators and precedence โperlsubโ Perl subroutines ๐งฉperlfuncโ Perl built-in functions โ๏ธperlopentutโ Perl open() tutorial ๐ชperlpacktutโ Perl pack() and unpack() tutorial ๐ฆ
perlpodโ Perl plain old documentation ๐perlpodspecโ Perl plain old documentation format specification ๐perldocstyleโ Perl style guide for core docs ๐perlpodstyleโ Perl POD style guide ๐จperldiagโ Perl diagnostic messages ๐ฉบperldeprecationโ Perl deprecations โณperllexwarnโ Perl warnings and their control โ ๏ธperldebugโ Perl debugging ๐perlvarโ Perl predefined variables ๐perlreโ Perl regular expressions, the rest of the story ๐perlrebackslashโ Perl regular expression backslash sequences\๐ซperlrecharclassโ Perl regular expression character classes[a-z]๐คperlrerefโ Perl regular expressions quick reference ๐perlrefโ Perl references, the rest of the story ๐perlformโ Perl formats ๐จ๏ธperlobjโ Perl objects ๐งฌperltieโ Perl objects hidden behind simple variables ๐ญperlclassโ Perl class syntax ๐๏ธperldbmfilterโ Perl DBM filters ๐๏ธ
perlipcโ Perl interprocess communication ๐กperlforkโ Perl fork() information ๐ดperlnumberโ Perl number semantics ๐ขperlthrtutโ Perl threads tutorial ๐งตperlportโ Perl portability guide ๐งณperllocaleโ Perl locale support ๐perluniintroโ Perl Unicode introduction ๐perlunicodeโ Perl Unicode support ๐perlunicookโ Perl Unicode cookbook ๐ฉโ๐ณperlunifaqโ Perl Unicode FAQ ๐perlunipropsโ Index of Unicode properties in Perl ๐๏ธperlunitutโ Perl Unicode tutorial ๐perlebcdicโ Considerations for running Perl on EBCDIC platforms ๐ฐ๏ธperlsecโ Perl security ๐perlsecpolicyโ Perl security report handling policy ๐ก๏ธperlmodโ Perl modules: how they work ๐งperlmodlibโ Perl modules: how to write and use ๐ฆperlmodstyleโ Perl modules: how to write modules with style โจperlmodinstallโ Perl modules: how to install from CPAN โฌ๏ธperlnewmodโ Perl modules: preparing a new module for distribution ๐perlpragmaโ Perl modules: writing a user pragma ๐ชperlutilโ utilities packaged with the Perl distribution ๐งฐperlfilterโ Perl source filters ๐งนperldtraceโ Perl's support for DTrace ๐ฏperlglossaryโ Perl Glossary ๐
Internals and C Language Interface
perlembedโ Perl ways to embed perl in your C or C++ application ๐ชperldebgutsโ Perl debugging guts and tips ๐ซperlxstutโ Perl XS tutorial ๐งชperlxsโ Perl XS application programming interface ๐perlxstypemapโ Perl XS C/Perl type conversion tools ๐perlclibโ Internal replacements for standard C library functions ๐งทperlgutsโ Perl internal functions for those doing extensions ๐ซperlcallโ Perl calling conventions from C ๐perlmroapiโ Perl method resolution plugin interface ๐งญperlreapiโ Perl regular expression plugin interface ๐งฉperlregutsโ Perl regular expression engine internals โ๏ธperlclassgutsโ Internals of class syntax ๐๏ธperlapiโ Perl API listing (autogenerated) ๐คperlinternโ Perl internal functions (autogenerated) ๐ ๏ธperliolโ C API for Perl's implementation of IO in Layers ๐งperlapioโ Perl internal IO abstraction interface ๐งperlhackโ Perl hackers guide ๐งโ๐ปperlsourceโ Guide to the Perl source tree ๐ณperlinterpโ Overview of the Perl interpreter source and how it works ๐perlhacktutโ Walk through the creation of a simple C code patch ๐ฉนperlhacktipsโ Tips for Perl core C code hacking ๐กperlpolicyโ Perl development policies ๐perlgovโ Perl Rules of Governance ๐๏ธperlgitโ Using git with the Perl repository ๐ฟ
๐ฐ๏ธ History
perlhistโ the Perl history records, aka the whole lore timeline ๐perldeltaโ Perl changes since previous versionperl5381deltaโ Perl changes in version 5.38.1perl5380deltaโ Perl changes in version 5.38.0perl5363deltaโ Perl changes in version 5.36.3perl5362deltaโ Perl changes in version 5.36.2perl5361deltaโ Perl changes in version 5.36.1perl5360deltaโ Perl changes in version 5.36.0perl5343deltaโ Perl changes in version 5.34.3perl5342deltaโ Perl changes in version 5.34.2perl5341deltaโ 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
๐ Miscellaneous
perlbookโ Perl book information, for when u want the physical lore ๐perlcommunityโ Perl community information, aka where ur people are ๐ซถperldocโ look up Perl documentation in Pod formatperlexperimentโ a listing of experimental features in Perl ๐งชperlartisticโ Perl Artistic Licenseperlgplโ GNU General Public License
๐ Language-Specific
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
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
perlbootperlbotperlrepositoryperltodoperltoocperltoot
okay so on Debian systems specifically, bestie, u gotta install the perl-doc package โ that's the one holding the majority of the standard Perl documentation plus the perldoc program itself. no perl-doc, no docs. that's the vibe ๐
There's also extensive additional documentation for Perl modules out there โ both the ones shipped with Perl and third-party modules that got packaged or installed locally. โจ
U should be able to peek at Perl's documentation with ur man(1) program or with perldoc(1). ๐ซถ
Lowkey important: some documentation just isn't available as man pages, so if man can't find a cross-reference, try it with perldoc instead. perldoc can also drop u straight into the docs for functions โ that's the -f switch, iykyk. For all the other helpful options perldoc has to offer, go look at "perldoc --help" (or "perldoc perldoc", or "man perldoc"). ๐
And generally? If something strange went wrong with ur program and ur not sure where to even look for help โ try making ur code comply with use strict and use warnings. These two will often point out exactly where the trouble is. periodt. ๐
๐ DESCRIPTION ๐
Perl officially stands for Practical Extraction and Report Language โ except when it doesn't. ๐
So back in the day, Perl was originally a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. And then it quickly became a genuinely good language for many system management tasks too. Over the years, Perl has grown into a general-purpose programming language. It's widely used for everything from quick "one-liners" all the way to full-scale application development. no cap. ๐
The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). That's the whole design philosophy bestie. It combines โ in the author's opinion, anyway โ some of the best features of sed, awk, and sh, which makes it familiar and easy to use for Unix users who wanna whip up quick solutions to annoying problems. โญ
Its general-purpose programming facilities support procedural, functional, and object-oriented programming paradigms โ which makes Perl a comfortable language for the long haul on major projects, whatever ur bent. ๐
And Perl's roots in text processing have not 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. And 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. For the full listing, see "Supported Platforms" in perlport. ๐ฅ๏ธโจ
๐ฟ ENVIRONMENT ๐ฟ
See "ENVIRONMENT" in perlrun.
๐ AUTHOR ๐
Larry Wall <larry@wall.org>, with the help of oodles of other folks. ๐ซถ
If ur Perl success stories and testimonials might be of help to others who wish to advocate the use of Perl in their applications, or if u just wanna simply express ur gratitude to Larry and the Perl developers โ please write to perl-thanks@perl.org . ๐
๐ FILES ๐
"@INC" locations of perl libraries
"@INC" up there 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's enabled by default when u say "use v5.35" (or higher). U can also use the -w flag, but its use is normally discouraged, because it gets applied to all executed Perl code โ including code that's not under ur control. ๐ฌ
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 u 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". Seeperlsec. โ ๏ธ
And did we mention that u should definitely consider using the use warnings pragma? ๐ญ just do it bestie
๐ซ BUGS ๐ซ
okay bestie, sit down, we gotta talk about the messy parts. ๐
- the whole vibe that the
use warningspragma implies? yeah, it's not mandatory. it's giving "suggestion, not a rule," and we just have to live with that. - Perl is fully at the mercy of whatever your machine thinks certain operations mean โ like type casting,
atof(), and floating-point output withsprintf(). so like, if your box is weird, Perl's gonna be weird. no cap. ๐ญ - if your
stdioneeds a seek or aneofbetween reads and writes on a particular stream, then so does Perl. (this does not apply tosysread()andsyswrite()โ those two are built different ๐ซถ) - so here's the tea: none of the built-in data types have any arbitrary size limits (apart from, y'know, memory size itself), BUT there are still a few arbitrary limits lurking:
- a given variable name may not be longer than 251 characters. yes, 251. very specific, don't ask.
- the line numbers that diagnostics display are internally stored as short integers, so they max out at 65535 (and higher numbers are usually affected by wraparound, which is the code equivalent of your brain buffering ๐ตโ๐ซ)
got a bug to report? please do, we love that for you. make sure you include the full configuration information โ the stuff that the myconfig program spits out in the perl source tree, or the stuff from perl -V โ and send it here:
https://github.com/Perl/perl5/issues
and finally, the biggest secret of them all: 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. (spoiler: it's a lot. it's so many. it's honestly iconic. ๐)
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 5.38.2, dated 2026-09-14, and it's filed under PERL(1). go forth and slay your one-liners, ily ๐๐ฆ
๐ฆ where this page comes from
- ubuntu noble: libperl5.38t64 5.38.2-3.2ubuntu0.6 ยท 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