-0
[ octnum ](That’s the number zero.) Designates an initial octal value for the record separator $/.
See also -l
below.
-a
Turns on autosplit mode when used with -n
or -p.
Splits to @F.
-c
Checks syntax but does not execute. It does run BEGIN and CHECK blocks.
-C
Uses native wide-character system APIs, if supported by the system.
-d
[ :module ]Runs the script under the indicated module. Default module is the Perl debugger. Use -de 0
to start the debugger without a script.
-D
flagsSets debugging flags.
-e
commandlineMay be used to enter a single line of script. Multiple -e
commands may be given to build up a multiline script.
-F
patSpecifies a pattern on which to split if -a
is in effect.
-h
Prints the Perl usage summary. Does not execute.
-i
[ ext ]Activates in-place editing for files processed by the <>
construct.
-I
dirThe directory is prepended to the search path for Perl modules, @INC.
Combined with -P, -I
also tells the C preprocessor where to look for include files.
-l
[ octnum ](That’s the letter el.) Enables automatic line ending processing, e.g., -l013.
-m
[ -
]module [ =
arg [ ,
arg... ] ]See -M
on the facing page.
-M
[ -
]module [ =
arg [ ,
arg... ] ]Does a use module before executing the script. With -
does a no module instead.
-n
Assumes an input loop around the script. Lines are not printed.
-p
Assumes an input loop around the script. Lines are printed.
-P
Runs the C preprocessor on the script before compilation by Perl.
-s
Interprets -xxx on the command line as a switch and sets the corresponding variable $
xxx in the script to 1. If the switch is of the form -xxx=yyy, the $
xxx variable is set to yyy.
-S
Uses the PATH
environment variable to search for the script.
-t
Turns on taint checking. warns on taint violations.
-T
Turns on taint checking. dies on taint violations.
-u
Dumps core after compiling the script. To be used with the undump program. Obsolete.
-U
Allows Perl to perform certain unsafe operations.
-v
Prints the version and patch level of your Perl executable. Does not execute anything.
-V
[ :var ]Prints Perl configuration information, e.g., -V:man.dir.
Does not execute anything.
-w
Prints warnings about possible spelling errors and other error-prone constructs in the script. Can be enabled and disabled under program control.
-W
Enables warnings permanently.
-x
[ dir ]Extracts the program script from the input stream. If dir is specified, Perl switches to this directory before running the script.
-X
Disables warnings permanently.
Command-line options -D, -I, -M, -T, -U, -d, -m, t
, and -w
may also be specified using environment variable PERL50PT.
All options except -M
and -m
may be used on the #!
line of the Perl script.