This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Omnibus removal of register declarations
[perl5.git] / pod / perlrun.pod
index 798bc04..9ed678c 100644 (file)
@@ -90,14 +90,15 @@ A similar trick involves the I<env> program, if you have it.
 
 The examples above use a relative path to the perl interpreter,
 getting whatever version is first in the user's path.  If you want
-a specific version of Perl, say, perl5.005_57, you should place
+a specific version of Perl, say, perl5.14.1, you should place
 that directly in the C<#!> line's path.
 
-If the C<#!> line does not contain the word "perl", the program named after
-the C<#!> is executed instead of the Perl interpreter.  This is slightly
-bizarre, but it helps people on machines that don't do C<#!>, because they
-can tell a program that their SHELL is F</usr/bin/perl>, and Perl will then
-dispatch the program to the correct interpreter for them.
+If the C<#!> line does not contain the word "perl" nor the word "indir"
+the program named after the C<#!> is executed instead of the Perl
+interpreter.  This is slightly bizarre, but it helps people on machines
+that don't do C<#!>, because they can tell a program that their SHELL is
+F</usr/bin/perl>, and Perl will then dispatch the program to the correct
+interpreter for them.
 
 After locating your program, Perl compiles the entire program to an
 internal form.  If there are any compilation errors, execution of the
@@ -143,8 +144,8 @@ Perl program and a Perl library file.
 
 Put
 
   $ perl -mysw 'f$env("procedure")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !
   $ exit++ + ++$status != 0 and $exit = $status = undef;
+ $ perl -mysw 'f$env("procedure")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !
+ $ exit++ + ++$status != 0 and $exit = $status = undef;
 
 at the top of your program, where B<-mysw> are any command line switches you
 want to pass to Perl.  You can now invoke the program directly, by saying
@@ -204,12 +205,12 @@ In this documentation, C<#!/usr/bin/perl> on the first line of the program
 will stand in for whatever method works on your system.  You are
 advised to use a specific path if you care about a specific version.
 
-    #!/usr/local/bin/perl5.00554
+    #!/usr/local/bin/perl5.14
 
 or if you just want to be running at least version, place a statement
 like this at the top of your program:
 
-    use 5.005_54;
+    use 5.014;
 
 =head2 Command Switches
 X<perl, command switches> X<command switches>
@@ -282,13 +283,13 @@ are as follows; listing the letters is equal to summing the numbers.
     D    24   i + o
     A    32   the @ARGV elements are expected to be strings encoded
               in UTF-8
-    L    64   normally the "IOEioA" are unconditional,
-              the L makes them conditional on the locale environment
-              variables (the LC_ALL, LC_TYPE, and LANG, in the order
-              of decreasing precedence) -- if the variables indicate
+    L    64   normally the "IOEioA" are unconditional, the L makes
+              them conditional on the locale environment variables
+              (the LC_ALL, LC_TYPE, and LANG, in the order of
+              decreasing precedence) -- if the variables indicate
               UTF-8, then the selected "IOEioA" are in effect
-    a   256   Set ${^UTF8CACHE} to -1, to run the UTF-8 caching code in
-              debugging mode.
+    a   256   Set ${^UTF8CACHE} to -1, to run the UTF-8 caching
+              code in debugging mode.
 
 =for documenting_the_underdocumented
 perl.h gives W/128 as PERL_UNICODE_WIDESYSCALLS "/* for Sarathy */"
@@ -394,19 +395,25 @@ B<-D14> is equivalent to B<-Dtls>):
       512  r  Regular expression parsing and execution
      1024  x  Syntax tree dump
      2048  u  Tainting checks
-     4096  U  Unofficial, User hacking (reserved for private, unreleased use)
+     4096  U  Unofficial, User hacking (reserved for private,
+              unreleased use)
      8192  H  Hash dump -- usurps values()
     16384  X  Scratchpad allocation
     32768  D  Cleaning up
+    65536  S  Op slab allocation
    131072  T  Tokenizing
-   262144  R  Include reference counts of dumped variables (eg when using -Ds)
-   524288  J  show s,t,P-debug (don't Jump over) on opcodes within package DB
+   262144  R  Include reference counts of dumped variables (eg when
+              using -Ds)
+   524288  J  show s,t,P-debug (don't Jump over) on opcodes within
+              package DB
   1048576  v  Verbose: use in conjunction with other flags
   2097152  C  Copy On Write
   4194304  A  Consistency checks on internal structures
-  8388608  q  quiet - currently only suppresses the "EXECUTING" message
+  8388608  q  quiet - currently only suppresses the "EXECUTING"
+              message
  16777216  M  trace smart match resolution
- 33554432  B  dump suBroutine definitions, including special Blocks like BEGIN
+ 33554432  B  dump suBroutine definitions, including special Blocks
+              like BEGIN
 
 All these flags require B<-DDEBUGGING> when you compile the Perl
 executable (but see C<:opd> in L<Devel::Peek> or L<re/'debug' mode>
@@ -513,20 +520,22 @@ as:
 This allows you to add a prefix to the backup file, instead of (or in
 addition to) a suffix:
 
-    $ perl -pi'orig_*' -e 's/bar/baz/' fileA   # backup to 'orig_fileA'
+ $ perl -pi'orig_*' -e 's/bar/baz/' fileA  # backup to
+                                           # 'orig_fileA'
 
 Or even to place backup copies of the original files into another
 directory (provided the directory already exists):
 
-    $ perl -pi'old/*.orig' -e 's/bar/baz/' fileA # backup to 'old/fileA.orig'
+ $ perl -pi'old/*.orig' -e 's/bar/baz/' fileA  # backup to
+                                               # 'old/fileA.orig'
 
 These sets of one-liners are equivalent:
 
   $ perl -pi -e 's/bar/baz/' fileA           # overwrite current file
   $ perl -pi'*' -e 's/bar/baz/' fileA                # overwrite current file
$ perl -pi -e 's/bar/baz/' fileA          # overwrite current file
$ perl -pi'*' -e 's/bar/baz/' fileA       # overwrite current file
 
   $ perl -pi'.orig' -e 's/bar/baz/' fileA    # backup to 'fileA.orig'
   $ perl -pi'*.orig' -e 's/bar/baz/' fileA   # backup to 'fileA.orig'
$ perl -pi'.orig' -e 's/bar/baz/' fileA   # backup to 'fileA.orig'
$ perl -pi'*.orig' -e 's/bar/baz/' fileA  # backup to 'fileA.orig'
 
 From the shell, saying
 
@@ -991,7 +1000,7 @@ as if they were on every Perl command line.  Only the B<-[CDIMUdmtwW]>
 switches are allowed.  When running taint checks (either because the
 program was running setuid or setgid, or because the B<-T> or B<-t>
 switch was used), this variable is ignored.  If PERL5OPT begins with
-B<- T>, tainting will be enabled and subsequent options ignored.  If
+B<-T>, tainting will be enabled and subsequent options ignored.  If
 PERL5OPT begins with B<-t>, tainting will be enabled, a writable dot
 removed from @INC, and subsequent options honored.
 
@@ -1003,7 +1012,7 @@ to use PerlIO system for IO (the default) these layers affect Perl's IO.
 
 It is conventional to start layer names with a colon (for example, C<:perlio>) to
 emphasize their similarity to variable "attributes". But the code that parses
-layer specification strings,  which is also used to decode the PERLIO
+layer specification strings, which is also used to decode the PERLIO
 environment variable, treats the colon as a separator.
 
 An unset or empty PERLIO is equivalent to the default set of layers for
@@ -1012,7 +1021,7 @@ and C<:unix:crlf> on Windows and other DOS-like systems.
 
 The list becomes the default for I<all> Perl's IO. Consequently only built-in
 layers can appear in this list, as external layers (such as C<:encoding()>) need
-IO in  order to load them!. See L<"open pragma"|open> for how to add external
+IO in order to load them!  See L<"open pragma"|open> for how to add external
 encodings as defaults.
 
 Layers it makes sense to include in the PERLIO environment
@@ -1125,7 +1134,7 @@ is run in taint mode.
 X<PERLIO_DEBUG>
 
 If set to the name of a file or device, certain operations of PerlIO
-subsystem will be logged to that file, which is opened in append mode
+subsystem will be logged to that file, which is opened in append mode.
 Typical uses are in Unix:
 
    % env PERLIO_DEBUG=/dev/tty perl script ...