PERL(1perl)
π 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β Perlopen()tutorial.perlpacktutβ Perlpack()andunpack()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β Perlfork()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 recordsperldeltaβ Perl changes since previous versionperl5422deltaβ Perl changes in version 5.42.2perl5421deltaβ Perl changes in version 5.42.1perl5420deltaβ Perl changes in version 5.42.0perl5404deltaβ Perl changes in version 5.40.4perl5403deltaβ Perl changes in version 5.40.3perl5402deltaβ Perl changes in version 5.40.2perl5401deltaβ Perl changes in version 5.40.1perl5400deltaβ Perl changes in version 5.40.0perl5385deltaβ Perl changes in version 5.38.5perl5384deltaβ Perl changes in version 5.38.4perl5383deltaβ Perl changes in version 5.38.3perl5382deltaβ Perl changes in version 5.38.2perl5381deltaβ 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
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 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
π¦ 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 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 (the ghost pages, rip)
perlbootperlbotperlrepositoryperltodoperltoocperltoot
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 πΈ
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 π
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 diagnosticspragma 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