summaryrefslogtreecommitdiff
path: root/pod/perlrun.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlrun.pod')
-rw-r--r--pod/perlrun.pod38
1 files changed, 23 insertions, 15 deletions
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index a2e0764c7b..dd467a5050 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -44,7 +44,7 @@ beginning, unless you've specified a B<-x> switch, in which case it
scans for the first line starting with #! and containing the word
"perl", and starts there instead. This is useful for running a script
embedded in a larger message. (In this case you would indicate the end
-of the script using the __END__ token.)
+of the script using the C<__END__> token.)
The #! line is always examined for switches as the line is being
parsed. Thus, if you're on a machine that allows only one argument
@@ -81,7 +81,7 @@ dispatch the program to the correct interpreter for them.
After locating your script, Perl compiles the entire script to an
internal form. If there are any compilation errors, execution of the
script is not attempted. (This is unlike the typical shell script,
-which might run partway through before finding a syntax error.)
+which might run part-way through before finding a syntax error.)
If the script is syntactically correct, it is executed. If the script
runs off the end without hitting an exit() or die() operator, an implicit
@@ -102,7 +102,7 @@ Put
as the first line in C<*.cmd> file (C<-S> due to a bug in cmd.exe's
`extproc' handling).
-=item DOS
+=item MS-DOS
Create a batch file to run your script, and codify it in
C<ALTERNATIVE_SHEBANG> (see the F<dosish.h> file in the source
@@ -138,10 +138,10 @@ For example:
# Unix
perl -e 'print "Hello world\n"'
- # DOS, etc.
+ # MS-DOS, etc.
perl -e "print \"Hello world\n\""
- # Mac
+ # Macintosh
print "Hello world\n"
(then Run "Myscript" or Shift-Command-R)
@@ -149,7 +149,7 @@ For example:
perl -e "print ""Hello world\n"""
The problem is that none of this is reliable: it depends on the command
-tirely possible neither works. If 4DOS was the command shell, this would
+and it is entirely possible neither works. If 4DOS was the command shell, this would
probably work better:
perl -e "print <Ctrl-x>"Hello world\n<Ctrl-x>""
@@ -158,9 +158,9 @@ CMD.EXE in Windows NT slipped a lot of standard Unix functionality in
when nobody was looking, but just try to find documentation for its
quoting rules.
-Under the Mac, it depends which environment you are using. The MacPerl
+Under the Macintosh, it depends which environment you are using. The MacPerl
shell, or MPW, is much like Unix shells in its support for several
-quoting variants, except that it makes free use of the Mac's non-ASCII
+quoting variants, except that it makes free use of the Macintosh's non-ASCII
characters as control characters.
There is no general solution to all of this. It's just a mess.
@@ -211,7 +211,7 @@ An alternate delimiter may be specified using B<-F>.
causes Perl to check the syntax of the script and then exit without
executing it. Actually, it I<will> execute C<BEGIN>, C<END>, and C<use> blocks,
-because these are considered as occurring outside the execution of
+because these are considered as occurring outside the execution of
your program.
=item B<-d>
@@ -254,11 +254,11 @@ equivalent to B<-Dtls>):
=item B<-e> I<commandline>
-may be used to enter one line of script.
+may be used to enter one line of script.
If B<-e> is given, Perl
-will not look for a script filename in the argument list.
+will not look for a script filename in the argument list.
Multiple B<-e> commands may
-be given to build up a multi-line script.
+be given to build up a multiline script.
Make sure to use semicolons where you would in a normal program.
=item B<-F>I<pattern>
@@ -309,8 +309,8 @@ know when the filename has changed. It does, however, use ARGVOUT for
the selected filehandle. Note that STDOUT is restored as the
default output filehandle after the loop.
-You can use C<eof> without parenthesis to locate the end of each input file,
-in case you want to append to each file, or reset line numbering (see
+You can use C<eof> without parenthesis to locate the end of each input file,
+in case you want to append to each file, or reset line numbering (see
example in L<perlfunc/eof>).
=item B<-I>I<directory>
@@ -358,7 +358,7 @@ e.g., C<-M'module qw(foo bar)'>.
If the first character after the C<-M> or C<-m> is a dash (C<->)
then the 'use' is replaced with 'no'.
-A little built-in syntactic sugar means you can also say
+A little builtin syntactic sugar means you can also say
C<-mmodule=foo,bar> or C<-Mmodule=foo,bar> as a shortcut for
C<-M'module qw(foo bar)'>. This avoids the need to use quotes when
importing symbols. The actual code generated by C<-Mmodule=foo,bar> is
@@ -547,6 +547,14 @@ instead say
use lib "/my/directory";
+=item PERL5OPT
+
+Command-line options (switches). Switches in this variable are taken
+as if they were on every Perl command line. Only the B<-[DIMUdmw]>
+switches are allowed. When running taint checks (because the script
+was running setuid or setgid, or the B<-T> switch was used), this
+variable is ignored.
+
=item PERLLIB
A colon-separated list of directories in which to look for Perl library