O'Reilly logo

Perl Pocket Reference, 5th Edition by Johan Vromans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required