Appendix A. Command-Line Options
--
Stops processing options.
-0
[ octnum ](Thatâs the number zero.) Designates an initial octal value for the record separator
$/.
See also-l
on the following page.-a
Turns on autosplit mode when used with
-n
or-p.
Splits to@F
.-c
Checks syntax but does not execute. It does, however, run BEGIN, CHECK, and UNITCHECK blocks.
-C
[ number / list ]Controls some of the Perl Unicode features.
-d
[ t ] [:
module ] [=
arg [,
arg... ] ]Runs the script under the indicated module. With
-dt
enable threads. 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 build up a multiline script.-E
Same as
-e,
but implicitly enables all optional features. See the section Pragmatic Modules.-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
.-l
[ octnum ](Thatâs the letter el.) Enables automatic line ending processing, e.g.,
-l013.
-m
[-
]module [=
arg [,
arg... ] ]-M
[-
]module [=
arg [,
arg... ] ]Does a use module before executing the script.
With
-
does a no module instead.Without arguments,
-M
imports the default set and-m
imports nothing.Otherwise, the arguments are passed to the moduleâs import method.
-n
Assumes an input ...
Get Perl Pocket Reference, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.