PERL(1)
๐ PERL(1) ๐
okay so this is the perl page from the Perl Programmers Reference Guide, and the vibe is: Perl 5 language interpreter, but make it bestie-coded. โจ
โจ NAME โจ
perl โ The Perl 5 language interpreter. no cap, that's the whole name section. ๐
๐ธ SYNOPSIS ๐ธ
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 more information on these options, you can run perldoc perlrun. ๐ซถ
๐ซถ GETTING HELP ๐ซถ
perldoc is the program that gives you access to all the documentation that comes with Perl. You can get more documentation, tutorials, and community support online at https://www.perl.org/. ๐
If you're new to Perl, start by running perldoc perlintro โ it's a general intro for beginners and gives you some background to help you navigate the rest of Perl's extensive documentation. Run perldoc perldoc to learn more things you can do with perldoc. ๐
For ease of access, the Perl manual has been split up into several sections. โจ
๐ธ Overview ๐ธ
perlโ Perl overview (this section)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 syntax: declarations, statements, commentsperldataโ Perl data structuresperlopโ Perl expressions: operators, precedence, string literalsperlsubโ Perl subroutinesperlfuncโ Perl built-in functionsperlopentutโ Perl open() tutorialperlpacktutโ Perl pack() and unpack() 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
perlclassโ Perl class syntaxperlipcโ Perl interprocess communicationperlforkโ Perl fork() 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โ Interacting with 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 internalsperlclassgutsโ Internals of class syntaxperlapiโ 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 โจ
bestie, this is the lore section ๐ every single time Perl levelled up, someone wrote a whole essay about it, and these are those essays. Newest at the top, chronological, no skips. ๐
perlhistโ the actual Perl history records, like the family scrapbook ๐perldeltaโ what changed since the previous version, aka the "what did we just do" note ๐ซถperl5422deltaโ the tea on what changed in version 5.42.2perl5421deltaโ changes in version 5.42.1perl5420deltaโ changes in version 5.42.0perl5404deltaโ changes in version 5.40.4perl5403deltaโ changes in version 5.40.3perl5402deltaโ changes in version 5.40.2perl5401deltaโ changes in version 5.40.1perl5400deltaโ changes in version 5.40.0perl5385deltaโ changes in version 5.38.5perl5384deltaโ changes in version 5.38.4perl5383deltaโ changes in version 5.38.3perl5382deltaโ changes in version 5.38.2perl5381deltaโ changes in version 5.38.1perl5380deltaโ changes in version 5.38.0perl5363deltaโ changes in version 5.36.3perl5362deltaโ changes in version 5.36.2perl5361deltaโ changes in version 5.36.1perl5360deltaโ changes in version 5.36.0perl5343deltaโ changes in version 5.34.3perl5342deltaโ changes in version 5.34.2perl5341deltaโ changes in version 5.34.1perl5340deltaโ changes in version 5.34.0perl5321deltaโ changes in version 5.32.1perl5320deltaโ changes in version 5.32.0perl5303deltaโ changes in version 5.30.3perl5302deltaโ changes in version 5.30.2perl5301deltaโ changes in version 5.30.1perl5300deltaโ changes in version 5.30.0perl5283deltaโ changes in version 5.28.3perl5282deltaโ changes in version 5.28.2perl5281deltaโ changes in version 5.28.1perl5280deltaโ changes in version 5.28.0perl5263deltaโ changes in version 5.26.3perl5262deltaโ changes in version 5.26.2perl5261deltaโ changes in version 5.26.1perl5260deltaโ changes in version 5.26.0perl5244deltaโ changes in version 5.24.4perl5243deltaโ changes in version 5.24.3perl5242deltaโ changes in version 5.24.2perl5241deltaโ changes in version 5.24.1perl5240deltaโ changes in version 5.24.0perl5224deltaโ changes in version 5.22.4perl5223deltaโ changes in version 5.22.3perl5222deltaโ changes in version 5.22.2perl5221deltaโ changes in version 5.22.1perl5220deltaโ changes in version 5.22.0perl5203deltaโ changes in version 5.20.3perl5202deltaโ changes in version 5.20.2perl5201deltaโ changes in version 5.20.1perl5200deltaโ changes in version 5.20.0perl5184deltaโ changes in version 5.18.4perl5182deltaโ changes in version 5.18.2perl5181deltaโ changes in version 5.18.1perl5180deltaโ changes in version 5.18.0perl5163deltaโ changes in version 5.16.3perl5162deltaโ changes in version 5.16.2perl5161deltaโ changes in version 5.16.1perl5160deltaโ changes in version 5.16.0perl5144deltaโ changes in version 5.14.4perl5143deltaโ changes in version 5.14.3perl5142deltaโ changes in version 5.14.2perl5141deltaโ changes in version 5.14.1perl5140deltaโ changes in version 5.14.0perl5125deltaโ changes in version 5.12.5perl5124deltaโ changes in version 5.12.4perl5123deltaโ changes in version 5.12.3perl5122deltaโ changes in version 5.12.2perl5121deltaโ changes in version 5.12.1perl5120deltaโ changes in version 5.12.0perl5101deltaโ changes in version 5.10.1perl5100deltaโ changes in version 5.10.0perl589deltaโ changes in version 5.8.9perl588deltaโ changes in version 5.8.8perl587deltaโ changes in version 5.8.7perl586deltaโ changes in version 5.8.6perl585deltaโ changes in version 5.8.5perl584deltaโ changes in version 5.8.4perl583deltaโ changes in version 5.8.3perl582deltaโ changes in version 5.8.2perl581deltaโ changes in version 5.8.1perl58deltaโ changes in version 5.8.0perl561deltaโ changes in version 5.6.1perl56deltaโ changes in version 5.6perl5005deltaโ changes in version 5.005perl5004deltaโ changes in version 5.004
๐ Miscellaneous ๐
the grab-bag section, we love her ๐
perlbookโ all the Perl book information you could ever want ๐perlcommunityโ where the Perl community hangs out, and how to find them ๐ซถperldocโ the tool that looks up Perl documentation in Pod format โจperlexperimentโ a whole listing of the experimental features in Perl ๐งชperlartisticโ the Perl Artistic License ๐perlgplโ the GNU General Public License ๐
๐ Language-Specific ๐
Perl, but make it multilingual ๐ฆ
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 platform said "not me being special" and wrote its own notes, so here they all are ๐ญ
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 ๐
rest in peace, besties ๐ฏ๏ธ these pages got deleted, so what's left are just stubs โ ghosts of docs past, lowkey giving haunted library energy:
perlbootperlbotperlrepositoryperltodoperltoocperltoot
heads up if you're on Debian: you need to install theperl-docpackage, because that is what contains the majority of the standard Perl documentation and theperldocprogram. no package, no docs, no vibes ๐ค
There's also extensive extra documentation for Perl modules โ and not just the ones shipped with Perl, but third-party modules too, whether they're packaged up or locally installed. ๐ฆ
You should be able to view Perl's documentation with your man(1) program or perldoc(1). Easy.
Some documentation is not available as man pages, okay, so if a cross-reference doesn't turn up when you man it, try it with perldoc instead. And perldoc can take you straight to the docs for functions โ that's with the -f switch ๐ฅ. See perldoc --help (or perldoc perldoc, or man perldoc) for all the other helpful options perldoc has to offer.
In general: if something strange has gone wrong with your program and you're not sure where to even look for help, try making your code comply with use strict and use warnings. Fr fr, these will often point out exactly where the trouble is. ๐ฏ
๐ฅ DESCRIPTION ๐ฅ
Perl officially stands for Practical Extraction and Report Language... except when it doesn't. ๐
Perl started out as a language optimized for three things: scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. Pretty quickly it turned out to also be a great language for a ton of system management tasks. And over the years? It grew all the way up into a general-purpose programming language. Now it's widely used for everything from quick "one-liners" to full-scale application development. glow-up of the century, honestly ๐
The language is meant 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, which makes it familiar and easy for Unix users who just want to whip up quick solutions to annoying problems. And its general-purpose programming facilities support procedural, functional, and object-oriented programming paradigms, which makes Perl a genuinely comfortable language for the long haul on major projects, whatever your bent. ๐ซถ
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, all 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. iconic behaviour, no notes. ๐
โจ 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. (yes bestie, the env-var deets live over there, go look ๐)
๐ AUTHOR ๐
Larry Wall <larry@wall.org>, with the help of oodles of other folks. ๐ซถ
If your Perl success stories and testimonials might help other people who want to advocate for using Perl in their applications โ or if you just want 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" 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 homepage<https://www.perl.com/>โ Perl articles<https://www.cpan.org/>โ the Comprehensive Perl Archive<https://www.pm.org/>โ the Perl Mongers
๐ DIAGNOSTICS ๐
okay bestie, real talk: using use strict is like having a friend who makes sure all variables are properly declared and prevents other misuses of legacy Perl features. iconic behavior, no cap. And these checks 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). You 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. so likeโฆ itโs giving messy.
lowkey important: seeperldiagfor explanations of all Perl's diagnostics. Theuse diagnosticspragma 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? ๐โจ
๐ญ BUGS ๐ญ
The behavior implied by the use warnings pragma is not mandatory. not me finding out itโs optional ๐
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
- Hubris
See the Camel Book for why.
okay thatโs the whole vibe, bestie โ this page is perl v5.42.3, dated 2026-08-17, and itโs PERL(1). now go forth and slay ๐
โจ๐ฆ
๐ฆ where this page comes from
- ubuntu stonking: perl-base 5.42.3-1 ยท 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