CINXE.COM

perl - The Perl 5 language interpreter - Perldoc Browser

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>perl - The Perl 5 language interpreter - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/perl"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/">Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.18.0</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/perl">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.0/perl">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.2/perl">5.38.2</a> <a class="dropdown-item" href="/5.38.1/perl">5.38.1</a> <a class="dropdown-item" href="/5.38.0/perl">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/perl">5.36.3</a> <a class="dropdown-item" href="/5.36.2/perl">5.36.2</a> <a class="dropdown-item" href="/5.36.1/perl">5.36.1</a> <a class="dropdown-item" href="/5.36.0/perl">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/perl">5.34.3</a> <a class="dropdown-item" href="/5.34.2/perl">5.34.2</a> <a class="dropdown-item" href="/5.34.1/perl">5.34.1</a> <a class="dropdown-item" href="/5.34.0/perl">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/perl">5.32.1</a> <a class="dropdown-item" href="/5.32.0/perl">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/perl">5.30.3</a> <a class="dropdown-item" href="/5.30.2/perl">5.30.2</a> <a class="dropdown-item" href="/5.30.1/perl">5.30.1</a> <a class="dropdown-item" href="/5.30.0/perl">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/perl">5.28.3</a> <a class="dropdown-item" href="/5.28.2/perl">5.28.2</a> <a class="dropdown-item" href="/5.28.1/perl">5.28.1</a> <a class="dropdown-item" href="/5.28.0/perl">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/perl">5.26.3</a> <a class="dropdown-item" href="/5.26.2/perl">5.26.2</a> <a class="dropdown-item" href="/5.26.1/perl">5.26.1</a> <a class="dropdown-item" href="/5.26.0/perl">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/perl">5.24.4</a> <a class="dropdown-item" href="/5.24.3/perl">5.24.3</a> <a class="dropdown-item" href="/5.24.2/perl">5.24.2</a> <a class="dropdown-item" href="/5.24.1/perl">5.24.1</a> <a class="dropdown-item" href="/5.24.0/perl">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/perl">5.22.4</a> <a class="dropdown-item" href="/5.22.3/perl">5.22.3</a> <a class="dropdown-item" href="/5.22.2/perl">5.22.2</a> <a class="dropdown-item" href="/5.22.1/perl">5.22.1</a> <a class="dropdown-item" href="/5.22.0/perl">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/perl">5.20.3</a> <a class="dropdown-item" href="/5.20.2/perl">5.20.2</a> <a class="dropdown-item" href="/5.20.1/perl">5.20.1</a> <a class="dropdown-item" href="/5.20.0/perl">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/perl">5.18.4</a> <a class="dropdown-item" href="/5.18.3/perl">5.18.3</a> <a class="dropdown-item" href="/5.18.2/perl">5.18.2</a> <a class="dropdown-item" href="/5.18.1/perl">5.18.1</a> <a class="dropdown-item active" href="/5.18.0/perl">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/perl">5.16.3</a> <a class="dropdown-item" href="/5.16.2/perl">5.16.2</a> <a class="dropdown-item" href="/5.16.1/perl">5.16.1</a> <a class="dropdown-item" href="/5.16.0/perl">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/perl">5.14.4</a> <a class="dropdown-item" href="/5.14.3/perl">5.14.3</a> <a class="dropdown-item" href="/5.14.2/perl">5.14.2</a> <a class="dropdown-item" href="/5.14.1/perl">5.14.1</a> <a class="dropdown-item" href="/5.14.0/perl">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/perl">5.12.5</a> <a class="dropdown-item" href="/5.12.4/perl">5.12.4</a> <a class="dropdown-item" href="/5.12.3/perl">5.12.3</a> <a class="dropdown-item" href="/5.12.2/perl">5.12.2</a> <a class="dropdown-item" href="/5.12.1/perl">5.12.1</a> <a class="dropdown-item" href="/5.12.0/perl">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/perl">5.10.1</a> <a class="dropdown-item" href="/5.10.0/perl">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/perl">5.8.9</a> <a class="dropdown-item" href="/5.8.8/perl">5.8.8</a> <a class="dropdown-item" href="/5.8.7/perl">5.8.7</a> <a class="dropdown-item" href="/5.8.6/perl">5.8.6</a> <a class="dropdown-item" href="/5.8.5/perl">5.8.5</a> <a class="dropdown-item" href="/5.8.4/perl">5.8.4</a> <a class="dropdown-item" href="/5.8.3/perl">5.8.3</a> <a class="dropdown-item" href="/5.8.2/perl">5.8.2</a> <a class="dropdown-item" href="/5.8.1/perl">5.8.1</a> <a class="dropdown-item" href="/5.8.0/perl">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/perl">5.6.2</a> <a class="dropdown-item" href="/5.6.1/perl">5.6.1</a> <a class="dropdown-item" href="/5.6.0/perl">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/perl">5.005_04</a> <a class="dropdown-item" href="/5.005_03/perl">5.005_03</a> <a class="dropdown-item" href="/5.005_02/perl">5.005_02</a> <a class="dropdown-item" href="/5.005_01/perl">5.005_01</a> <a class="dropdown-item" href="/5.005/perl">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/perl">blead</a> <a class="dropdown-item" href="/5.41.6/perl">5.41.6</a> <a class="dropdown-item" href="/5.41.5/perl">5.41.5</a> <a class="dropdown-item" href="/5.41.4/perl">5.41.4</a> <a class="dropdown-item" href="/5.41.3/perl">5.41.3</a> <a class="dropdown-item" href="/5.41.2/perl">5.41.2</a> <a class="dropdown-item" href="/5.41.1/perl">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.0-RC2/perl">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/perl">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/perl">5.39.10</a> <a class="dropdown-item" href="/5.39.9/perl">5.39.9</a> <a class="dropdown-item" href="/5.39.8/perl">5.39.8</a> <a class="dropdown-item" href="/5.39.7/perl">5.39.7</a> <a class="dropdown-item" href="/5.39.6/perl">5.39.6</a> <a class="dropdown-item" href="/5.39.5/perl">5.39.5</a> <a class="dropdown-item" href="/5.39.4/perl">5.39.4</a> <a class="dropdown-item" href="/5.39.3/perl">5.39.3</a> <a class="dropdown-item" href="/5.39.2/perl">5.39.2</a> <a class="dropdown-item" href="/5.39.1/perl">5.39.1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.18.0/perl">Perl</a> <a class="dropdown-item" href="/5.18.0/perlintro">Intro</a> <a class="dropdown-item" href="/5.18.0/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.18.0/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.18.0/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.0/perlop">Operators</a> <a class="dropdown-item" href="/5.18.0/functions">Functions</a> <a class="dropdown-item" href="/5.18.0/variables">Variables</a> <a class="dropdown-item" href="/5.18.0/modules">Modules</a> <a class="dropdown-item" href="/5.18.0/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.0/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.18.0/perlcommunity">Community</a> <a class="dropdown-item" href="/5.18.0/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.18.0/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.18.0/perl">perl</a> <div id="more"> (<a href="/5.18.0/perl.txt">source</a>, <a href="https://metacpan.org/pod/perl">CPAN</a>) </div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.18.0. <a href="/perl">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#SYNOPSIS">SYNOPSIS</a> </li> <li> <a class="text-decoration-none" href="#GETTING-HELP">GETTING HELP</a> <ul> <li> <a class="text-decoration-none" href="#Overview">Overview</a> </li> <li> <a class="text-decoration-none" href="#Tutorials">Tutorials</a> </li> <li> <a class="text-decoration-none" href="#Reference-Manual">Reference Manual</a> </li> <li> <a class="text-decoration-none" href="#Internals-and-C-Language-Interface">Internals and C Language Interface</a> </li> <li> <a class="text-decoration-none" href="#Miscellaneous">Miscellaneous</a> </li> <li> <a class="text-decoration-none" href="#Language-Specific">Language-Specific</a> </li> <li> <a class="text-decoration-none" href="#Platform-Specific">Platform-Specific</a> </li> <li> <a class="text-decoration-none" href="#Stubs-for-Deleted-Documents">Stubs for Deleted Documents</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> </li> <li> <a class="text-decoration-none" href="#AVAILABILITY">AVAILABILITY</a> </li> <li> <a class="text-decoration-none" href="#ENVIRONMENT">ENVIRONMENT</a> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> <li> <a class="text-decoration-none" href="#FILES">FILES</a> </li> <li> <a class="text-decoration-none" href="#SEE-ALSO">SEE ALSO</a> </li> <li> <a class="text-decoration-none" href="#DIAGNOSTICS">DIAGNOSTICS</a> </li> <li> <a class="text-decoration-none" href="#BUGS">BUGS</a> </li> <li> <a class="text-decoration-none" href="#NOTES">NOTES</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>perl - The Perl 5 language interpreter</p> <h1 id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">#</a>SYNOPSIS</h1> <p><b>perl</b> <span style="white-space: nowrap;">[ <b>-sTtuUWX</b> ]</span> <span style="white-space: nowrap;">[ <b>-hv</b> ] [ <b>-V</b>[:<i>configvar</i>] ]</span> <span style="white-space: nowrap;">[ <b>-cw</b> ] [ <b>-d</b>[<b>t</b>][:<i>debugger</i>] ] [ <b>-D</b>[<i>number/list</i>] ]</span> <span style="white-space: nowrap;">[ <b>-pna</b> ] [ <b>-F</b><i>pattern</i> ] [ <b>-l</b>[<i>octal</i>] ] [ <b>-0</b>[<i>octal/hexadecimal</i>] ]</span> <span style="white-space: nowrap;">[ <b>-I</b><i>dir</i> ] [ <b>-m</b>[<b>-</b>]<i>module</i> ] [ <b>-M</b>[<b>-</b>]<i>&#39;module...&#39;</i> ] [ <b>-f</b> ]</span> <span style="white-space: nowrap;">[ <b>-C [<i>number/list</i>] </b>]</span> <span style="white-space: nowrap;">[ <b>-S</b> ]</span> <span style="white-space: nowrap;">[ <b>-x</b>[<i>dir</i>] ]</span> <span style="white-space: nowrap;">[ <b>-i</b>[<i>extension</i>] ]</span> <span style="white-space: nowrap;">[ [<b>-e</b>|<b>-E</b>] <i>&#39;command&#39;</i> ] [ <b>--</b> ] [ <i>programfile</i> ] [ <i>argument</i> ]...</span></p> <p>For more information on these options, you can run <a href="/5.18.0/perlrun"><code>perldoc perlrun</code></a>.</p> <h1 id="GETTING-HELP"><a class="permalink" href="#GETTING-HELP">#</a><a id="GETTING"></a>GETTING HELP</h1> <p>The <i>perldoc</i> program gives you access to all the documentation that comes with Perl. You can get more documentation, tutorials and community support online at <a href="http://www.perl.org/">http://www.perl.org/</a>.</p> <p>If you&#39;re new to Perl, you should start by running <a href="/5.18.0/perlintro"><code>perldoc perlintro</code></a>, which is a general intro for beginners and provides some background to help you navigate the rest of Perl&#39;s extensive documentation. Run <a href="/5.18.0/perldoc"><code>perldoc perldoc</code></a> to learn more things you can do with <i>perldoc</i>.</p> <p>For ease of access, the Perl manual has been split up into several sections.</p> <h2 id="Overview"><a class="permalink" href="#Overview">#</a>Overview</h2> <pre><code class="nohighlight">perl Perl overview (this section) <a href="/5.18.0/perlintro">perlintro</a> Perl introduction for beginners <a href="/5.18.0/perlrun">perlrun</a> Perl execution and options <a href="/5.18.0/perltoc">perltoc</a> Perl documentation table of contents</code></pre> <h2 id="Tutorials"><a class="permalink" href="#Tutorials">#</a>Tutorials</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlreftut">perlreftut</a> Perl references short introduction <a href="/5.18.0/perldsc">perldsc</a> Perl data structures intro <a href="/5.18.0/perllol">perllol</a> Perl data structures: arrays of arrays <a href="/5.18.0/perlrequick">perlrequick</a> Perl regular expressions quick start <a href="/5.18.0/perlretut">perlretut</a> Perl regular expressions tutorial <a href="/5.18.0/perlootut">perlootut</a> Perl OO tutorial for beginners <a href="/5.18.0/perlperf">perlperf</a> Perl Performance and Optimization Techniques <a href="/5.18.0/perlstyle">perlstyle</a> Perl style guide <a href="/5.18.0/perlcheat">perlcheat</a> Perl cheat sheet <a href="/5.18.0/perltrap">perltrap</a> Perl traps for the unwary <a href="/5.18.0/perldebtut">perldebtut</a> Perl debugging tutorial <a href="/5.18.0/perlfaq">perlfaq</a> Perl frequently asked questions <a href="/5.18.0/perlfaq1">perlfaq1</a> General Questions About Perl <a href="/5.18.0/perlfaq2">perlfaq2</a> Obtaining and Learning about Perl <a href="/5.18.0/perlfaq3">perlfaq3</a> Programming Tools <a href="/5.18.0/perlfaq4">perlfaq4</a> Data Manipulation <a href="/5.18.0/perlfaq5">perlfaq5</a> Files and Formats <a href="/5.18.0/perlfaq6">perlfaq6</a> Regexes <a href="/5.18.0/perlfaq7">perlfaq7</a> Perl Language Issues <a href="/5.18.0/perlfaq8">perlfaq8</a> System Interaction <a href="/5.18.0/perlfaq9">perlfaq9</a> Networking</code></pre> <h2 id="Reference-Manual"><a class="permalink" href="#Reference-Manual">#</a><a id="Reference"></a>Reference Manual</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlsyn">perlsyn</a> Perl syntax <a href="/5.18.0/perldata">perldata</a> Perl data structures <a href="/5.18.0/perlop">perlop</a> Perl operators and precedence <a href="/5.18.0/perlsub">perlsub</a> Perl subroutines <a href="/5.18.0/perlfunc">perlfunc</a> Perl built-in functions <a href="/5.18.0/perlopentut">perlopentut</a> Perl open() tutorial <a href="/5.18.0/perlpacktut">perlpacktut</a> Perl pack() and unpack() tutorial <a href="/5.18.0/perlpod">perlpod</a> Perl plain old documentation <a href="/5.18.0/perlpodspec">perlpodspec</a> Perl plain old documentation format specification <a href="/5.18.0/perlpodstyle">perlpodstyle</a> Perl POD style guide <a href="/5.18.0/perldiag">perldiag</a> Perl diagnostic messages <a href="/5.18.0/perllexwarn">perllexwarn</a> Perl warnings and their control <a href="/5.18.0/perldebug">perldebug</a> Perl debugging <a href="/5.18.0/perlvar">perlvar</a> Perl predefined variables <a href="/5.18.0/perlre">perlre</a> Perl regular expressions, the rest of the story <a href="/5.18.0/perlrebackslash">perlrebackslash</a> Perl regular expression backslash sequences <a href="/5.18.0/perlrecharclass">perlrecharclass</a> Perl regular expression character classes <a href="/5.18.0/perlreref">perlreref</a> Perl regular expressions quick reference <a href="/5.18.0/perlref">perlref</a> Perl references, the rest of the story <a href="/5.18.0/perlform">perlform</a> Perl formats <a href="/5.18.0/perlobj">perlobj</a> Perl objects <a href="/5.18.0/perltie">perltie</a> Perl objects hidden behind simple variables <a href="/5.18.0/perldbmfilter">perldbmfilter</a> Perl DBM filters <a href="/5.18.0/perlipc">perlipc</a> Perl interprocess communication <a href="/5.18.0/perlfork">perlfork</a> Perl fork() information <a href="/5.18.0/perlnumber">perlnumber</a> Perl number semantics <a href="/5.18.0/perlthrtut">perlthrtut</a> Perl threads tutorial <a href="/5.18.0/perlport">perlport</a> Perl portability guide <a href="/5.18.0/perllocale">perllocale</a> Perl locale support <a href="/5.18.0/perluniintro">perluniintro</a> Perl Unicode introduction <a href="/5.18.0/perlunicode">perlunicode</a> Perl Unicode support <a href="/5.18.0/perlunifaq">perlunifaq</a> Perl Unicode FAQ <a href="/5.18.0/perluniprops">perluniprops</a> Index of Unicode properties in Perl <a href="/5.18.0/perlunitut">perlunitut</a> Perl Unicode tutorial <a href="/5.18.0/perlebcdic">perlebcdic</a> Considerations for running Perl on EBCDIC platforms <a href="/5.18.0/perlsec">perlsec</a> Perl security <a href="/5.18.0/perlmod">perlmod</a> Perl modules: how they work <a href="/5.18.0/perlmodlib">perlmodlib</a> Perl modules: how to write and use <a href="/5.18.0/perlmodstyle">perlmodstyle</a> Perl modules: how to write modules with style <a href="/5.18.0/perlmodinstall">perlmodinstall</a> Perl modules: how to install from CPAN <a href="/5.18.0/perlnewmod">perlnewmod</a> Perl modules: preparing a new module for distribution <a href="/5.18.0/perlpragma">perlpragma</a> Perl modules: writing a user pragma <a href="/5.18.0/perlutil">perlutil</a> utilities packaged with the Perl distribution <a href="/5.18.0/perlfilter">perlfilter</a> Perl source filters <a href="/5.18.0/perldtrace">perldtrace</a> Perl&#39;s support for DTrace <a href="/5.18.0/perlglossary">perlglossary</a> Perl Glossary</code></pre> <h2 id="Internals-and-C-Language-Interface"><a class="permalink" href="#Internals-and-C-Language-Interface">#</a><a id="Internals"></a>Internals and C Language Interface</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlembed">perlembed</a> Perl ways to embed perl in your C or C++ application <a href="/5.18.0/perldebguts">perldebguts</a> Perl debugging guts and tips <a href="/5.18.0/perlxstut">perlxstut</a> Perl XS tutorial <a href="/5.18.0/perlxs">perlxs</a> Perl XS application programming interface <a href="/5.18.0/perlxstypemap">perlxstypemap</a> Perl XS C/Perl type conversion tools <a href="/5.18.0/perlclib">perlclib</a> Internal replacements for standard C library functions <a href="/5.18.0/perlguts">perlguts</a> Perl internal functions for those doing extensions <a href="/5.18.0/perlcall">perlcall</a> Perl calling conventions from C <a href="/5.18.0/perlmroapi">perlmroapi</a> Perl method resolution plugin interface <a href="/5.18.0/perlreapi">perlreapi</a> Perl regular expression plugin interface <a href="/5.18.0/perlreguts">perlreguts</a> Perl regular expression engine internals <a href="/5.18.0/perlapi">perlapi</a> Perl API listing (autogenerated) <a href="/5.18.0/perlintern">perlintern</a> Perl internal functions (autogenerated) <a href="/5.18.0/perliol">perliol</a> C API for Perl&#39;s implementation of IO in Layers <a href="/5.18.0/perlapio">perlapio</a> Perl internal IO abstraction interface <a href="/5.18.0/perlhack">perlhack</a> Perl hackers guide <a href="/5.18.0/perlsource">perlsource</a> Guide to the Perl source tree <a href="/5.18.0/perlinterp">perlinterp</a> Overview of the Perl interpreter source and how it works <a href="/5.18.0/perlhacktut">perlhacktut</a> Walk through the creation of a simple C code patch <a href="/5.18.0/perlhacktips">perlhacktips</a> Tips for Perl core C code hacking <a href="/5.18.0/perlpolicy">perlpolicy</a> Perl development policies <a href="/5.18.0/perlgit">perlgit</a> Using git with the Perl repository</code></pre> <h2 id="Miscellaneous"><a class="permalink" href="#Miscellaneous">#</a>Miscellaneous</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlbook">perlbook</a> Perl book information <a href="/5.18.0/perlcommunity">perlcommunity</a> Perl community information <a href="/5.18.0/perldoc">perldoc</a> Look up Perl documentation in Pod format <a href="/5.18.0/perlhist">perlhist</a> Perl history records <a href="/5.18.0/perldelta">perldelta</a> Perl changes since previous version <a href="/5.18.0/perl5180delta">perl5180delta</a> Perl changes in version 5.18.0 <a href="/5.18.0/perl5161delta">perl5161delta</a> Perl changes in version 5.16.1 <a href="/5.18.0/perl5162delta">perl5162delta</a> Perl changes in version 5.16.2 <a href="/5.18.0/perl5163delta">perl5163delta</a> Perl changes in version 5.16.3 <a href="/5.18.0/perl5160delta">perl5160delta</a> Perl changes in version 5.16.0 <a href="/5.18.0/perl5144delta">perl5144delta</a> Perl changes in version 5.14.4 <a href="/5.18.0/perl5143delta">perl5143delta</a> Perl changes in version 5.14.3 <a href="/5.18.0/perl5142delta">perl5142delta</a> Perl changes in version 5.14.2 <a href="/5.18.0/perl5141delta">perl5141delta</a> Perl changes in version 5.14.1 <a href="/5.18.0/perl5140delta">perl5140delta</a> Perl changes in version 5.14.0 <a href="/5.18.0/perl5125delta">perl5125delta</a> Perl changes in version 5.12.5 <a href="/5.18.0/perl5124delta">perl5124delta</a> Perl changes in version 5.12.4 <a href="/5.18.0/perl5123delta">perl5123delta</a> Perl changes in version 5.12.3 <a href="/5.18.0/perl5122delta">perl5122delta</a> Perl changes in version 5.12.2 <a href="/5.18.0/perl5121delta">perl5121delta</a> Perl changes in version 5.12.1 <a href="/5.18.0/perl5120delta">perl5120delta</a> Perl changes in version 5.12.0 <a href="/5.18.0/perl5101delta">perl5101delta</a> Perl changes in version 5.10.1 <a href="/5.18.0/perl5100delta">perl5100delta</a> Perl changes in version 5.10.0 <a href="/5.18.0/perl589delta">perl589delta</a> Perl changes in version 5.8.9 <a href="/5.18.0/perl588delta">perl588delta</a> Perl changes in version 5.8.8 <a href="/5.18.0/perl587delta">perl587delta</a> Perl changes in version 5.8.7 <a href="/5.18.0/perl586delta">perl586delta</a> Perl changes in version 5.8.6 <a href="/5.18.0/perl585delta">perl585delta</a> Perl changes in version 5.8.5 <a href="/5.18.0/perl584delta">perl584delta</a> Perl changes in version 5.8.4 <a href="/5.18.0/perl583delta">perl583delta</a> Perl changes in version 5.8.3 <a href="/5.18.0/perl582delta">perl582delta</a> Perl changes in version 5.8.2 <a href="/5.18.0/perl581delta">perl581delta</a> Perl changes in version 5.8.1 <a href="/5.18.0/perl58delta">perl58delta</a> Perl changes in version 5.8.0 <a href="/5.18.0/perl561delta">perl561delta</a> Perl changes in version 5.6.1 <a href="/5.18.0/perl56delta">perl56delta</a> Perl changes in version 5.6 <a href="/5.18.0/perl5005delta">perl5005delta</a> Perl changes in version 5.005 <a href="/5.18.0/perl5004delta">perl5004delta</a> Perl changes in version 5.004 <a href="/5.18.0/perlexperiment">perlexperiment</a> A listing of experimental features in Perl <a href="/5.18.0/perlartistic">perlartistic</a> Perl Artistic License <a href="/5.18.0/perlgpl">perlgpl</a> GNU General Public License</code></pre> <h2 id="Language-Specific"><a class="permalink" href="#Language-Specific">#</a><a id="Language"></a>Language-Specific</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlcn">perlcn</a> Perl for Simplified Chinese (in EUC-CN) <a href="/5.18.0/perljp">perljp</a> Perl for Japanese (in EUC-JP) <a href="/5.18.0/perlko">perlko</a> Perl for Korean (in EUC-KR) <a href="/5.18.0/perltw">perltw</a> Perl for Traditional Chinese (in Big5)</code></pre> <h2 id="Platform-Specific"><a class="permalink" href="#Platform-Specific">#</a><a id="Platform"></a>Platform-Specific</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlaix">perlaix</a> Perl notes for AIX <a href="/5.18.0/perlamiga">perlamiga</a> Perl notes for AmigaOS <a href="/5.18.0/perlbs2000">perlbs2000</a> Perl notes for POSIX-BC BS2000 <a href="/5.18.0/perlce">perlce</a> Perl notes for WinCE <a href="/5.18.0/perlcygwin">perlcygwin</a> Perl notes for Cygwin <a href="/5.18.0/perldgux">perldgux</a> Perl notes for DG/UX <a href="/5.18.0/perldos">perldos</a> Perl notes for DOS <a href="/5.18.0/perlfreebsd">perlfreebsd</a> Perl notes for FreeBSD <a href="/5.18.0/perlhaiku">perlhaiku</a> Perl notes for Haiku <a href="/5.18.0/perlhpux">perlhpux</a> Perl notes for HP-UX <a href="/5.18.0/perlhurd">perlhurd</a> Perl notes for Hurd <a href="/5.18.0/perlirix">perlirix</a> Perl notes for Irix <a href="/5.18.0/perllinux">perllinux</a> Perl notes for Linux <a href="/5.18.0/perlmacos">perlmacos</a> Perl notes for Mac OS (Classic) <a href="/5.18.0/perlmacosx">perlmacosx</a> Perl notes for Mac OS X <a href="/5.18.0/perlnetware">perlnetware</a> Perl notes for NetWare <a href="/5.18.0/perlopenbsd">perlopenbsd</a> Perl notes for OpenBSD <a href="/5.18.0/perlos2">perlos2</a> Perl notes for OS/2 <a href="/5.18.0/perlos390">perlos390</a> Perl notes for OS/390 <a href="/5.18.0/perlos400">perlos400</a> Perl notes for OS/400 <a href="/5.18.0/perlplan9">perlplan9</a> Perl notes for Plan 9 <a href="/5.18.0/perlqnx">perlqnx</a> Perl notes for QNX <a href="/5.18.0/perlriscos">perlriscos</a> Perl notes for RISC OS <a href="/5.18.0/perlsolaris">perlsolaris</a> Perl notes for Solaris <a href="/5.18.0/perlsymbian">perlsymbian</a> Perl notes for Symbian <a href="/5.18.0/perltru64">perltru64</a> Perl notes for Tru64 <a href="/5.18.0/perlvms">perlvms</a> Perl notes for VMS <a href="/5.18.0/perlvos">perlvos</a> Perl notes for Stratus VOS <a href="/5.18.0/perlwin32">perlwin32</a> Perl notes for Windows</code></pre> <h2 id="Stubs-for-Deleted-Documents"><a class="permalink" href="#Stubs-for-Deleted-Documents">#</a><a id="Stubs"></a>Stubs for Deleted Documents</h2> <pre><code class="nohighlight"><a href="/5.18.0/perlboot">perlboot</a> <a href="/5.18.0/perlbot">perlbot</a> <a href="/5.18.0/perltodo">perltodo</a> <a href="/5.18.0/perltooc">perltooc</a> <a href="/5.18.0/perltoot">perltoot</a> </code></pre> <p>On a Unix-like system, these documentation files will usually also be available as manpages for use with the <i>man</i> program.</p> <p>Some documentation is not available as man pages, so if a cross-reference is not found by man, try it with <a href="/5.18.0/perldoc">perldoc</a>. Perldoc can also take you directly to documentation for functions (with the <b>-f</b> switch). See <code>perldoc --help</code> (or <a href="/5.18.0/perldoc"><code>perldoc perldoc</code></a> or <code>man perldoc</code>) for other helpful options <a href="/5.18.0/perldoc">perldoc</a> has to offer.</p> <p>In general, if something strange has gone wrong with your program and you&#39;re not sure where you should look for help, try making your code comply with <b>use <a href="/5.18.0/strict">strict</a></b> and <b>use <a href="/5.18.0/warnings">warnings</a></b>. These will often point out exactly where the trouble is.</p> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p>Perl officially stands for Practical Extraction and Report Language, except when it doesn&#39;t.</p> <p>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&#39;s widely used for everything from quick &quot;one-liners&quot; to full-scale application development.</p> <p>The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). It combines (in the author&#39;s opinion, anyway) some of the best features of <b>sed</b>, <b>awk</b>, and <b>sh</b>, 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.</p> <p>Perl&#39;s roots in text processing haven&#39;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&#39;t set the standard themselves, they steal from the best -- just like Perl itself.</p> <h1 id="AVAILABILITY"><a class="permalink" href="#AVAILABILITY">#</a>AVAILABILITY</h1> <p>Perl is available for most operating systems, including virtually all Unix-like platforms. See <a href="/5.18.0/perlport#Supported-Platforms">&quot;Supported Platforms&quot; in perlport</a> for a listing.</p> <h1 id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">#</a>ENVIRONMENT</h1> <p>See <a href="/5.18.0/perlrun">perlrun</a>.</p> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Larry Wall &lt;larry@wall.org&gt;, with the help of oodles of other folks.</p> <p>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 .</p> <h1 id="FILES"><a class="permalink" href="#FILES">#</a>FILES</h1> <pre><code class="nohighlight">&quot;@INC&quot; locations of perl libraries</code></pre> <h1 id="SEE-ALSO"><a class="permalink" href="#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1> <pre><code class="nohighlight">http://www.perl.org/ the Perl homepage http://www.perl.com/ Perl articles (O&#39;Reilly) http://www.cpan.org/ the Comprehensive Perl Archive http://www.pm.org/ the Perl Mongers</code></pre> <h1 id="DIAGNOSTICS"><a class="permalink" href="#DIAGNOSTICS">#</a>DIAGNOSTICS</h1> <p>Using the <code>use <a href="/5.18.0/strict">strict</a></code> pragma ensures that all variables are properly declared and prevents other misuses of legacy Perl features.</p> <p>The <code>use <a href="/5.18.0/warnings">warnings</a></code> pragma produces some lovely diagnostics. One can also use the <b>-w</b> flag, but its use is normally discouraged, because it gets applied to all executed Perl code, including that not under your control.</p> <p>See <a href="/5.18.0/perldiag">perldiag</a> for explanations of all Perl&#39;s diagnostics. The <code>use <a href="/5.18.0/diagnostics">diagnostics</a></code> pragma automatically turns Perl&#39;s normally terse warnings and errors into these longer forms.</p> <p>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 <b>-e</b> switches, each <b>-e</b> is counted as one line.)</p> <p>Setuid scripts have additional constraints that can produce error messages such as &quot;Insecure dependency&quot;. See <a href="/5.18.0/perlsec">perlsec</a>.</p> <p>Did we mention that you should definitely consider using the <b>use <a href="/5.18.0/warnings">warnings</a></b> pragma?</p> <h1 id="BUGS"><a class="permalink" href="#BUGS">#</a>BUGS</h1> <p>The behavior implied by the <b>use <a href="/5.18.0/warnings">warnings</a></b> pragma is not mandatory.</p> <p>Perl is at the mercy of your machine&#39;s definitions of various operations such as type casting, atof(), and floating-point output with sprintf().</p> <p>If your stdio requires a seek or eof between reads and writes on a particular stream, so does Perl. (This doesn&#39;t apply to sysread() and syswrite().)</p> <p>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).</p> <p>You may mail your bug reports (be sure to include full configuration information as output by the myconfig program in the perl source tree, or by <code>perl -V</code>) to perlbug@perl.org . If you&#39;ve succeeded in compiling perl, the <a href="/5.18.0/perlbug">perlbug</a> script in the <i>utils/</i> subdirectory can be used to help mail in a bug report.</p> <p>Perl actually stands for Pathologically Eclectic Rubbish Lister, but don&#39;t tell anyone I said that.</p> <h1 id="NOTES"><a class="permalink" href="#NOTES">#</a>NOTES</h1> <p>The Perl motto is &quot;There&#39;s more than one way to do it.&quot; Divining how many more is left as an exercise to the reader.</p> <p>The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why.</p> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10