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

Special Arrays

The alternative names are provided by the standard module English.

@_

Alternative: @ARG.

Parameter array for subroutines. Also used by split if not in list context.

@-

Alternative: @LAST_MATCH_START.

After a successful pattern match, contains the offsets of the beginnings of the successful submatches. $-[0] is the offset of the entire match.

@+

Alternative: @LAST_MATCH_END.

Like @-, but the offsets point to the ends of the submatches. $+[0] is the offset of the end of the entire match.

@ARGV

Contains the command-line arguments for the script (not including the command name, which is in $0).

@EXPORT

Names the methods and other symbols a package exports by default. Used by the Exporter module.

@EXPORT_OK

Names the methods and other symbols a package can export upon request. Used by the Exporter module.

@F

When command-line option -a is used, contains the split of the input lines.

@INC

Contains the list of places to look for Perl scripts to be evaluated by the do filename, use and require commands.

Do not modify @INC directly, but use the lib pragma or -I command-line option instead.

@ISA

List of base classes of a package.

perlvar.

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