Skip to Main Content
Perl Pocket Reference, 5th Edition
book

Perl Pocket Reference, 5th Edition

by Johan Vromans
July 2011
Intermediate to advanced content levelIntermediate to advanced
104 pages
2h 14m
English
O'Reilly Media, Inc.
Content preview from Perl Pocket Reference, 5th Edition

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 flags

Sets debugging flags.

-e commandline

May 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 pat

Specifies 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 dir

The 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 loop ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 9781449311186Errata Page