PERL(1perl)

πŸ“¦
version 5.44.0 Β· 2 versions
, in arch rolling

πŸ’– PERL(1perl) πŸ’– β€” Perl Programmers Reference Guide

✨ NAME ✨

perl β€” The Perl 5 language interpreter. periodt.

πŸŽ€ SYNOPSIS πŸŽ€

Okay bestie, here's the whole vibe:

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. iykyk.

🫢 GETTING HELP 🫢

The perldoc program 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/. slay.

If you're new to Perl, you should start by running perldoc perlintro, which is a general intro for beginners and provides 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. obsessed.

For ease of access, the Perl manual has been split up into several sections. vibe check:

🌸 Overview 🌸

  • perl β€” Perl overview (this section). yes, literally this one.
  • 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.
  • perlopentut β€” Perl open() tutorial.
  • perlpacktut β€” Perl pack() and unpack() tutorial.
  • perldebtut β€” Perl debugging tutorial.
  • perlcheat β€” Perl cheat sheet.
  • perlperf β€” Perl Performance and Optimization Techniques.
  • perlstyle β€” Perl style guide.
  • perltrap β€” Perl traps for the unwary.
  • perlfaq β€” Perl frequently asked questions.
    • perlfaq1 β€” General Questions About Perl.
    • perlfaq2 β€” Obtaining and Learning about Perl.
    • perlfaq3 β€” Programming Tools.
    • perlfaq4 β€” Data Manipulation.
    • perlfaq5 β€” Files and Formats.
    • perlfaq6 β€” Regexes.
    • perlfaq7 β€” Perl Language Issues.
    • perlfaq8 β€” System Interaction.
    • perlfaq9 β€” Networking.

πŸ“š Reference Manual πŸ“š

  • perlsyn β€” Perl syntax: declarations, statements, comments.
  • perldata β€” Perl data structures.
  • perlop β€” Perl expressions: operators, precedence, string literals.
  • perlsub β€” Perl subroutines.
  • perlfunc β€” Perl built-in functions.
  • 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.
  • 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.
  • perldbmfilter β€” Perl DBM filters.
  • perlclass β€” Perl class syntax.
  • 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 β€” Interacting with 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 (the lore, bestie) 🫢

  • perlhist β€” Perl history records
  • perldelta β€” Perl changes since previous version
  • perl5422delta β€” Perl changes in version 5.42.2
  • perl5421delta β€” Perl changes in version 5.42.1
  • perl5420delta β€” Perl changes in version 5.42.0
  • perl5404delta β€” Perl changes in version 5.40.4
  • perl5403delta β€” Perl changes in version 5.40.3
  • perl5402delta β€” Perl changes in version 5.40.2
  • perl5401delta β€” Perl changes in version 5.40.1
  • perl5400delta β€” Perl changes in version 5.40.0
  • perl5385delta β€” Perl changes in version 5.38.5
  • perl5384delta β€” Perl changes in version 5.38.4
  • perl5383delta β€” Perl changes in version 5.38.3
  • perl5382delta β€” Perl changes in version 5.38.2
  • perl5381delta β€” Perl changes in version 5.38.1
  • perl5380delta β€” Perl changes in version 5.38.0
  • perl5363delta β€” Perl changes in version 5.36.3
  • perl5362delta β€” Perl changes in version 5.36.2
  • perl5361delta β€” Perl changes in version 5.36.1
  • perl5360delta β€” Perl changes in version 5.36.0
  • perl5343delta β€” Perl changes in version 5.34.3
  • perl5342delta β€” Perl changes in version 5.34.2
  • perl5341delta β€” Perl changes in version 5.34.1
  • perl5340delta β€” Perl changes in version 5.34.0
  • perl5321delta β€” Perl changes in version 5.32.1
  • perl5320delta β€” Perl changes in version 5.32.0
  • perl5303delta β€” Perl changes in version 5.30.3
  • perl5302delta β€” Perl changes in version 5.30.2
  • perl5301delta β€” Perl changes in version 5.30.1
  • perl5300delta β€” Perl changes in version 5.30.0
  • perl5283delta β€” Perl changes in version 5.28.3
  • perl5282delta β€” Perl changes in version 5.28.2
  • perl5281delta β€” Perl changes in version 5.28.1
  • perl5280delta β€” Perl changes in version 5.28.0
  • perl5263delta β€” Perl changes in version 5.26.3
  • perl5262delta β€” Perl changes in version 5.26.2
  • perl5261delta β€” Perl changes in version 5.26.1
  • perl5260delta β€” Perl changes in version 5.26.0
  • perl5244delta β€” Perl changes in version 5.24.4
  • perl5243delta β€” Perl changes in version 5.24.3
  • perl5242delta β€” Perl changes in version 5.24.2
  • perl5241delta β€” Perl changes in version 5.24.1
  • perl5240delta β€” Perl changes in version 5.24.0
  • perl5224delta β€” Perl changes in version 5.22.4
  • perl5223delta β€” Perl changes in version 5.22.3
  • perl5222delta β€” Perl changes in version 5.22.2
  • perl5221delta β€” Perl changes in version 5.22.1
  • perl5220delta β€” Perl changes in version 5.22.0
  • perl5203delta β€” Perl changes in version 5.20.3
  • perl5202delta β€” Perl changes in version 5.20.2
  • perl5201delta β€” Perl changes in version 5.20.1
  • perl5200delta β€” Perl changes in version 5.20.0
  • perl5184delta β€” Perl changes in version 5.18.4
  • perl5182delta β€” Perl changes in version 5.18.2
  • perl5181delta β€” Perl changes in version 5.18.1
  • perl5180delta β€” Perl changes in version 5.18.0
  • perl5163delta β€” Perl changes in version 5.16.3
  • perl5162delta β€” Perl changes in version 5.16.2
  • perl5161delta β€” Perl changes in version 5.16.1
  • perl5160delta β€” Perl changes in version 5.16.0
  • perl5144delta β€” Perl changes in version 5.14.4
  • perl5143delta β€” Perl changes in version 5.14.3
  • perl5142delta β€” Perl changes in version 5.14.2
  • perl5141delta β€” Perl changes in version 5.14.1
  • perl5140delta β€” Perl changes in version 5.14.0
  • perl5125delta β€” Perl changes in version 5.12.5
  • perl5124delta β€” Perl changes in version 5.12.4
  • perl5123delta β€” Perl changes in version 5.12.3
  • perl5122delta β€” Perl changes in version 5.12.2
  • perl5121delta β€” Perl changes in version 5.12.1
  • perl5120delta β€” Perl changes in version 5.12.0
  • perl5101delta β€” Perl changes in version 5.10.1
  • perl5100delta β€” Perl changes in version 5.10.0
  • perl589delta β€” Perl changes in version 5.8.9
  • perl588delta β€” Perl changes in version 5.8.8
  • perl587delta β€” Perl changes in version 5.8.7
  • perl586delta β€” Perl changes in version 5.8.6
  • perl585delta β€” Perl changes in version 5.8.5
  • perl584delta β€” Perl changes in version 5.8.4
  • perl583delta β€” Perl changes in version 5.8.3
  • perl582delta β€” Perl changes in version 5.8.2
  • perl581delta β€” Perl changes in version 5.8.1
  • perl58delta β€” Perl changes in version 5.8.0
  • perl561delta β€” Perl changes in version 5.6.1
  • perl56delta β€” Perl changes in version 5.6
  • perl5005delta β€” Perl changes in version 5.005
  • perl5004delta β€” Perl changes in version 5.004

okay that's the entire release-note archive and yes, we're listing every single one, no cutting corners πŸ’…


✨ Miscellaneous (the odds & ends drawer) πŸŽ€

  • perlbook β€” Perl book information
  • perlcommunity β€” Perl community information
  • perldoc β€” Look up Perl documentation in Pod format
  • perlexperiment β€” A listing of experimental features in Perl
  • perlartistic β€” Perl Artistic License
  • perlgpl β€” 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 OS wanted a piece) πŸ‘‘

  • perlaix β€” Perl notes for AIX
  • perlamiga β€” Perl notes for AmigaOS
  • perlandroid β€” Perl notes for Android
  • perlbs2000 β€” Perl notes for POSIX-BC BS2000
  • perlcygwin β€” Perl notes for Cygwin
  • perlfreebsd β€” Perl notes for FreeBSD
  • perlhaiku β€” Perl notes for Haiku
  • perlhpux β€” Perl notes for HP-UX
  • perlhurd β€” Perl notes for Hurd
  • perlirix β€” Perl notes for Irix
  • perllinux β€” Perl notes for Linux
  • perlmacosx β€” Perl notes for Mac OS X
  • perlopenbsd β€” Perl notes for OpenBSD
  • perlos2 β€” Perl notes for OS/2
  • perlos390 β€” Perl notes for OS/390
  • perlos400 β€” Perl notes for OS/400
  • perlplan9 β€” Perl notes for Plan 9
  • perlqnx β€” Perl notes for QNX
  • perlriscos β€” Perl notes for RISC OS
  • perlsolaris β€” Perl notes for Solaris
  • perlsynology β€” Perl notes for Synology
  • perltru64 β€” Perl notes for Tru64
  • perlvms β€” Perl notes for VMS
  • perlvos β€” Perl notes for Stratus VOS
  • perlwin32 β€” Perl notes for Windows

πŸ’€ Stubs for Deleted Documents (the ghost pages, rip)

  • perlboot
  • perlbot
  • perlrepository
  • perltodo
  • perltooc
  • perltoot

So here's the tea on all of that: on a Unix-like system, these documentation files will usually also be sitting there as manpages, ready for the man program to serve up 🫢

Some documentation isn't available as man pages at all, so if man can't find a cross-reference, try it with perldoc instead. And perldoc can take you straight to the docs for functions too β€” that's the -f switch. Wanna see all the other helpful options perldoc has to offer? Check perldoc --help (or perldoc perldoc, or man perldoc). Go crazy ✨

And okay, real talk: in general, if something strange has gone wrong with your program and you're genuinely not sure where to even look for help, try making your code comply with use strict and use warnings. Not me recommending this as a personality trait, but these two will often point out exactly where the trouble is πŸ”₯


DESCRIPTION πŸ’–

Perl officially stands for Practical Extraction and Report Language β€” except when it doesn't. (Iconic behaviour, honestly.)

Perl was originally a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. Then it quickly became a 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" to full-scale application development. It's giving range πŸ’…

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 who wanna 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 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, bestie. 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. 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

The "@INC" above is a reference to the built-in variable of the same name; see perlvar for more information.


SEE ALSO 🌸

πŸ’– DIAGNOSTICS πŸ’–

okay bestie, listen, this section is literally your safety net and you're gonna want it. 🌸

using the use strict pragma means all your variables get properly declared and it stops you from doing other chaotic legacy-Perl nonsense. and the slay part? it's on by default inside the scope of use v5.12 (or higher). periodt. πŸ’…

the use warnings pragma gives you some truly lovely diagnostics β€” iconic, gorgeous, no notes. it's on by default when you say use v5.35 (or higher). you can also use the -w flag, but lowkey its use is normally discouraged, because it gets applied to all executed Perl code β€” including code that is not under your control. 😭 (not your code, not your problem, and yet.)

  • wanna know what all of Perl's diagnostics actually mean? check perldiag, it explains every single one. πŸ“–
  • the use diagnostics pragma will take Perl's normally terse warnings and errors and glow them up into those longer forms automatically. ✨

compilation errors will tell you the line number of the error, plus an indication of the next token (or token type) that was to be examined. (and if it's a script passed to Perl via -e switches, each -e counts as one line. yes really. πŸ™ˆ)

Setuid scripts have extra constraints that can produce error messages such as "Insecure dependency". go read perlsec for that whole situation. πŸ”’

and did we mention that you should definitely consider using the use warnings pragma? bestie. use it. 🫢


πŸ’€ BUGS πŸ’€

ngl, some stuff here is just how it is. the behavior implied by the use warnings pragma is not mandatory. (scream.)

Perl is at the mercy of your machine's definitions of various operations, like type casting, atof(), and floating-point output with sprintf(). it's giving "your computer said so". πŸ’€

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(), those are exempt bestie. πŸ¦‹)

so, about arbitrary limits β€” none of the built-in data types have any (apart from, you know, memory size), but there are still a few lurking:

  • a given variable name may not be longer than 251 characters.
  • line numbers displayed by diagnostics are internally stored as short integers, so they max out at 65535 (higher numbers usually being affected by wraparound). πŸ™ƒ

and if you've got a bug to report, you may submit your bug reports to <https://github.com/Perl/perl5/issues> β€” but bestie, be sure to include full configuration information as output by the myconfig program in the perl source tree, or by perl -V. give them the receipts. πŸ“

also, fun lore drop: 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. 😌 (iykyk)

and the three principal virtues of a programmer? Laziness, Impatience, and Hubris. see the Camel Book for why. πŸ‘‘


and that's the whole page, bestie!! 🫢🌸 this was perl version v5.44.0 from 2026-10-17, filed under PERL(1perl). go write something iconic. πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms