Skip to Content
Perl Pocket Reference, 4th Edition
book

Perl Pocket Reference, 4th Edition

by Johan Vromans
July 2002
Beginner to intermediate
96 pages
1h 53m
English
O'Reilly Media, Inc.
Content preview from Perl Pocket Reference, 4th Edition

Chapter 2. 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 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 flags

Sets debugging flags.

-e commandline

May be used to enter a single line of script. Multiple -e commands may be given to build up a multiline script.

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

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Perl Pocket Reference, 5th Edition

Perl Pocket Reference, 5th Edition

Johan Vromans
Learning Perl 6

Learning Perl 6

brian d foy
Think Perl 6

Think Perl 6

Laurent Rosenfeld, Allen B. Downey
Perl Hacks

Perl Hacks

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

Publisher Resources

ISBN: 9780596806354Errata Page