The default input and pattern-searching space. The following pairs are
equivalent:
<PRE>
while (<>) {...} # equivalent only in while!
while (defined($_ = <>)) {...}</PRE>
<PRE>
/^Subject:/
$_ =~ /^Subject:/</PRE>
<PRE>
tr/a-z/A-Z/
$_ =~ tr/a-z/A-Z/</PRE>
<PRE>
chomp
chomp($_)</PRE>
<P>Here are the places where Perl will assume $_ even if you
don't use it:</P>
<UL>
<LI>
Various unary functions, including functions like <A HREF="../../lib/Pod/perlfunc.html#item_ord"><CODE>ord()</CODE></A> and int(), as well
as the all file tests (<CODE>-f</CODE>, <CODE>-d</CODE>) except for <CODE>-t</CODE>, which defaults to
STDIN.
<P></P>
<LI>
Various list functions like <A HREF="../../lib/Pod/perlfunc.html#item_print"><CODE>print()</CODE></A> and unlink().
<P></P>
<LI>
The pattern matching operations <CODE>m//</CODE>, <CODE>s///</CODE>, and <CODE>tr///</CODE> when used
without an <CODE>=~</CODE> operator.
<P></P>
<LI>
The default iterator variable in a <CODE>foreach</CODE> loop if no other
variable is supplied.
<P></P>
<LI>
The implicit iterator variable in the <A HREF="../../lib/Pod/perlfunc.html#item_grep"><CODE>grep()</CODE></A> and <A HREF="../../lib/Pod/perlfunc.html#item_map"><CODE>map()</CODE></A> functions.
<P></P>
<LI>
The default place to put an input record when a <CODE><FH></CODE>
operation's result is tested by itself as the sole criterion of a <CODE>while</CODE>
test. Outside a <CODE>while</CODE> test, this will not happen.
<P></P></UL>
<P>(Mnemonic: underline is understood in certain operations.)</P>
The current input record number for the last file handle from which
you just <A HREF="../../lib/Pod/perlfunc.html#item_read"><CODE>read()</CODE></A> (or called a <A HREF="../../lib/Pod/perlfunc.html#item_seek"><CODE>seek</CODE></A> or <A HREF="../../lib/Pod/perlfunc.html#item_tell"><CODE>tell</CODE></A> on). The value
may be different from the actual physical line number in the file,
depending on what notion of ``line'' is in effect--see <A HREF="#item_%24%2F"><CODE>$/</CODE></A> on how
to change that. An explicit close on a filehandle resets the line
number. Because <CODE><></CODE> never does an explicit close, line
numbers increase across ARGV files (but see examples in <A HREF="../../lib/Pod/perlfunc.html#eof">eof in the perlfunc manpage</A>).
Consider this variable read-only: setting it does not reposition
the seek pointer; you'll have to do that on your own. Localizing <A HREF="#item_%24%2E"><CODE>$.</CODE></A>
has the effect of also localizing Perl's notion of ``the last read
filehandle''. (Mnemonic: many programs use ``.'' to mean the current line
The input record separator, newline by default. This
influences Perl's idea of what a ``line'' is. Works like <STRONG>awk</STRONG>'s RS
variable, including treating empty lines as a terminator if set to
the null string. (An empty line cannot contain any spaces
or tabs.) You may set it to a multi-character string to match a
multi-character terminator, or to <A HREF="../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A> to read through the end
of file. Setting it to <CODE>"\n\n"</CODE> means something slightly
different than setting to <CODE>""</CODE>, if the file contains consecutive
empty lines. Setting to <CODE>""</CODE> will treat two or more consecutive
empty lines as a single empty line. Setting to <CODE>"\n\n"</CODE> will
blindly assume that the next input character belongs to the next
paragraph, even if it's a newline. (Mnemonic: / delimits
line boundaries when quoting poetry.)
<PRE>
undef $/; # enable "slurp" mode
$_ = <FH>; # whole file now here
s/\n[ \t]+/ /g;</PRE>
<P>Remember: the value of <A HREF="#item_%24%2F"><CODE>$/</CODE></A> is a string, not a regex. <STRONG>awk</STRONG> has to be
better for something. :-)</P>
<P>Setting <A HREF="#item_%24%2F"><CODE>$/</CODE></A> to a reference to an integer, scalar containing an integer, or
scalar that's convertible to an integer will attempt to read records
instead of lines, with the maximum record size being the referenced
integer. So this:</P>
<PRE>
$/ = \32768; # or \"32768", or \$var_containing_32768
open(FILE, $myfile);
$_ = <FILE>;</PRE>
<P>will read a record of no more than 32768 bytes from FILE. If you're
not reading from a record-oriented file (or your OS doesn't have
record-oriented files), then you'll likely get a full chunk of data
with every read. If a record is larger than the record size you've
set, you'll get the record back in pieces.</P>
<P>On VMS, record reads are done with the equivalent of <A HREF="../../lib/Pod/perlfunc.html#item_sysread"><CODE>sysread</CODE></A>,
so it's best not to mix record and non-record reads on the same
file. (This is unlikely to be a problem, because any file you'd
want to read in record mode is probably unusable in line mode.)
Non-VMS systems do normal I/O, so it's safe to mix record and
non-record reads of a file.</P>
<P>See also <A HREF="../../lib/Pod/perlport.html#newlines">Newlines in the perlport manpage</A>. Also see <A HREF="#item_%24%2E"><CODE>$.</CODE></A>.</P>
$-[0] is the offset of the start of the last successful match.
<CODE>$-[</CODE><EM>n</EM><CODE>]</CODE> is the offset of the start of the substring matched by
<EM>n</EM>-th subpattern, or undef if the subpattern did not match.
<P>Thus after a match against $_, $& coincides with <CODE>substr $_, $-[0],
$+[0] - $-[0]</CODE>. Similarly, <CODE>$</CODE><EM>n</EM> coincides with <CODE>substr $_, $-[</CODE><EM>n</EM><CODE>],
$+[</CODE><EM>n</EM><CODE>] - $-[</CODE><EM>n</EM><CODE>]</CODE> if <CODE>$-[</CODE><EM>n</EM><CODE>]</CODE> is defined, and $+ coincides with
<CODE>substr $_, $-[$#-], $+[$#-]</CODE>. One can use <CODE>$#-</CODE> to find the last
matched subgroup in the last successful match. Contrast with
<CODE>$#+</CODE>, the number of subgroups in the regular expression. Compare
with <A HREF="#item_%40%2B"><CODE>@+</CODE></A>.</P>
<P>This array holds the offsets of the beginnings of the last
successful submatches in the currently active dynamic scope.
<CODE>$-[0]</CODE> is the offset into the string of the beginning of the
entire match. The <EM>n</EM>th element of this array holds the offset
of the <EM>n</EM>th submatch, so <CODE>$+[1]</CODE> is the offset where $1
begins, <CODE>$+[2]</CODE> the offset where $2 begins, and so on.
You can use <CODE>$#-</CODE> to determine how many subgroups were in the
last successful match. Compare with the <A HREF="#item_%40%2B"><CODE>@+</CODE></A> variable.</P>
<P>After a match against some variable $var:</P>
<DL>
<DT><STRONG><A NAME="item_substr"><A HREF="#item_%24%60"><CODE>$`</CODE></A> is the same as <CODE>substr($var, 0, $-[0]</CODE>)</A></STRONG><BR>
<DD>
<DT><STRONG><A HREF="#item_%24%26"><CODE>$&</CODE></A> is the same as <CODE>substr($var, $-[0], $+[0] - $-[0]</CODE>)</STRONG><BR>
<DD>
<DT><STRONG><A HREF="#item_%24%27"><CODE>$'</CODE></A> is the same as <CODE>substr($var, $+[0]</CODE>)</STRONG><BR>
<DD>
<DT><STRONG><CODE>$1</CODE> is the same as <CODE>substr($var, $-[1], $+[1] - $-[1])</CODE></STRONG><BR>
<DD>
<DT><STRONG><CODE>$2</CODE> is the same as <CODE>substr($var, $-[2], $+[2] - $-[2])</CODE></STRONG><BR>
<DD>
<DT><STRONG><A NAME="item_%243_is_the_same_as_substr_%24var%2C_%24%2D%5B3%5D"><CODE>$3</CODE> is the same as <CODE>substr $var, $-[3], $+[3] - $-[3]</CODE>)</A></STRONG><BR>
The current value of the <A HREF="../../lib/Pod/perlfunc.html#item_write"><CODE>write()</CODE></A> accumulator for <A HREF="../../lib/Pod/perlfunc.html#item_format"><CODE>format()</CODE></A> lines. A format
contains <A HREF="../../lib/Pod/perlfunc.html#item_formline"><CODE>formline()</CODE></A> calls that put their result into <A HREF="#item_%24%5EA"><CODE>$^A</CODE></A>. After
calling its format, <A HREF="../../lib/Pod/perlfunc.html#item_write"><CODE>write()</CODE></A> prints out the contents of <A HREF="#item_%24%5EA"><CODE>$^A</CODE></A> and empties.
So you never really see the contents of <A HREF="#item_%24%5EA"><CODE>$^A</CODE></A> unless you call
<A HREF="../../lib/Pod/perlfunc.html#item_formline"><CODE>formline()</CODE></A> yourself and then look at it. See <A HREF="../../lib/Pod/perlform.html">the perlform manpage</A> and
<A HREF="../../lib/Pod/perlfunc.html#formline()">formline() in the perlfunc manpage</A>.
The status returned by the last pipe close, backtick (<CODE>``</CODE>) command,
successful call to <A HREF="../../lib/Pod/perlfunc.html#item_wait"><CODE>wait()</CODE></A> or waitpid(), or from the <A HREF="../../lib/Pod/perlfunc.html#item_system"><CODE>system()</CODE></A>
operator. This is just the 16-bit status word returned by the
<A HREF="../../lib/Pod/perlfunc.html#item_wait"><CODE>wait()</CODE></A> system call (or else is made up to look like it). Thus, the
exit value of the subprocess is really (<CODE>$? >> 8</CODE>), and
<CODE>$? & 127</CODE> gives which signal, if any, the process died from, and
<CODE>$? & 128</CODE> reports whether there was a core dump. (Mnemonic:
similar to <STRONG>sh</STRONG> and <STRONG>ksh</STRONG>.)
<P>Additionally, if the <CODE>h_errno</CODE> variable is supported in C, its value
is returned via $? if any <CODE>gethost*()</CODE> function fails.</P>
<P>If you have installed a signal handler for <CODE>SIGCHLD</CODE>, the
value of <A HREF="#item_%24%3F"><CODE>$?</CODE></A> will usually be wrong outside that handler.</P>
<P>Inside an <CODE>END</CODE> subroutine <A HREF="#item_%24%3F"><CODE>$?</CODE></A> contains the value that is going to be
given to <A HREF="../../lib/Pod/perlfunc.html#item_exit"><CODE>exit()</CODE></A>. You can modify <A HREF="#item_%24%3F"><CODE>$?</CODE></A> in an <CODE>END</CODE> subroutine to
change the exit status of your program. For example:</P>
<PRE>
END {
$? = 1 if $? == 255; # die would make it 255
}</PRE>
<P>Under VMS, the pragma <CODE>use vmsish 'status'</CODE> makes <A HREF="#item_%24%3F"><CODE>$?</CODE></A> reflect the
actual VMS exit status, instead of the default emulation of POSIX
status.</P>
<P>Also see <A HREF="#error indicators">Error Indicators</A>.</P>
The effective gid of this process. If you are on a machine that
supports membership in multiple groups simultaneously, gives a space
separated list of groups you are in. The first number is the one
returned by getegid(), and the subsequent ones by getgroups(), one of
which may be the same as the first number.
<P>Similarly, a value assigned to <A HREF="#item_%24%29"><CODE>$)</CODE></A> must also be a space-separated
list of numbers. The first number sets the effective gid, and
the rest (if any) are passed to setgroups(). To get the effect of an
empty list for setgroups(), just repeat the new effective gid; that is,
to force an effective gid of 5 and an effectively empty <CODE>setgroups()</CODE>
list, say <CODE> $) = "5 5" </CODE>.</P>
<P>(Mnemonic: parentheses are used to <EM>group</EM> things. The effective gid
is the group that's <EM>right</EM> for you, if you're running setgid.)</P>
<P><A HREF="#item_%24%3C"><CODE>$<</CODE></A>, <A HREF="#item_%24%3E"><CODE>$></CODE></A>, <A HREF="#item_%24%28"><CODE>$(</CODE></A> and <A HREF="#item_%24%29"><CODE>$)</CODE></A> can be set only on
machines that support the corresponding <EM>set[re][ug]id()</EM> routine. <A HREF="#item_%24%28"><CODE>$(</CODE></A>
and <A HREF="#item_%24%29"><CODE>$)</CODE></A> can be swapped only on machines supporting setregid().</P>
The index of the first element in an array, and of the first character
in a substring. Default is 0, but you could theoretically set it
to 1 to make Perl behave more like <STRONG>awk</STRONG> (or Fortran) when
subscripting and when evaluating the <A HREF="../../lib/Pod/perlfunc.html#item_index"><CODE>index()</CODE></A> and <A HREF="#item_substr"><CODE>substr()</CODE></A> functions.
(Mnemonic: [ begins subscripts.)
<P>As of release 5 of Perl, assignment to <A HREF="#item_%24%5B"><CODE>$[</CODE></A> is treated as a compiler
directive, and cannot influence the behavior of any other file.
The version + patchlevel / 1000 of the Perl interpreter. This variable
can be used to determine whether the Perl interpreter executing a
script is in the right range of versions. (Mnemonic: Is this version
of perl in the right bracket?) Example:
<PRE>
warn "No checksumming!\n" if $] < 3.019;</PRE>
<P>See also the documentation of <A HREF="../../lib/Pod/perlfunc.html#item_use"><CODE>use VERSION</CODE></A> and <A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require VERSION</CODE></A>
for a convenient way to fail if the running Perl interpreter is too old.</P>
<P>The use of this variable is deprecated. The floating point representation
can sometimes lead to inaccurate numeric comparisons. See <A HREF="#item_%24%5EV"><CODE>$^V</CODE></A> for a
more modern representation of the Perl version that allows accurate string
The revision, version, and subversion of the Perl interpreter, represented
as a string composed of characters with those ordinals. Thus in Perl v5.6.0
it equals <A HREF="../../lib/Pod/perlfunc.html#item_chr"><CODE>chr(5) . chr(6) . chr(0)</CODE></A> and will return true for
<CODE>$^V eq v5.6.0</CODE>. Note that the characters in this string value can
potentially be in Unicode range.
<P>This can be used to determine whether the Perl interpreter executing a
script is in the right range of versions. (Mnemonic: use ^V for Version
Control.) Example:</P>
<PRE>
warn "No "our" declarations!\n" if $^V and $^V lt v5.6.0;</PRE>
<P>See the documentation of <A HREF="../../lib/Pod/perlfunc.html#item_use"><CODE>use VERSION</CODE></A> and <A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require VERSION</CODE></A>
for a convenient way to fail if the running Perl interpreter is too old.</P>
<P>See also <A HREF="#item_%24%5D"><CODE>$]</CODE></A> for an older representation of the Perl version.</P>
The array @INC contains the list of places that the <A HREF="../../lib/Pod/perlfunc.html#item_do"><CODE>do EXPR</CODE></A>,
<A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require</CODE></A>, or <A HREF="../../lib/Pod/perlfunc.html#item_use"><CODE>use</CODE></A> constructs look for their library files. It
initially consists of the arguments to any <STRONG>-I</STRONG> command-line
switches, followed by the default Perl library, probably
<EM>/usr/local/lib/perl</EM>, followed by ``.'', to represent the current
directory. If you need to modify this at runtime, you should use
the <CODE>use lib</CODE> pragma to get the machine-dependent library properly
The hash %INC contains entries for each filename included via the
<A HREF="../../lib/Pod/perlfunc.html#item_do"><CODE>do</CODE></A>, <A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require</CODE></A>, or <A HREF="../../lib/Pod/perlfunc.html#item_use"><CODE>use</CODE></A> operators. The key is the filename
you specified (with module names converted to pathnames), and the
value is the location of the file found. The <A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require</CODE></A>
operator uses this hash to determine whether a particular file has
<P>Certain internal hooks can be also set using the %SIG hash. The
routine indicated by <CODE>$SIG{__WARN__}</CODE> is called when a warning message is
about to be printed. The warning message is passed as the first
argument. The presence of a __WARN__ hook causes the ordinary printing
of warnings to STDERR to be suppressed. You can use this to save warnings
in a variable, or turn warnings into fatal errors, like this:</P>
<PRE>
local $SIG{__WARN__} = sub { die $_[0] };
eval $proggie;</PRE>
<P>The routine indicated by <CODE>$SIG{__DIE__}</CODE> is called when a fatal exception
is about to be thrown. The error message is passed as the first
argument. When a __DIE__ hook routine returns, the exception
processing continues as it would have in the absence of the hook,
unless the hook routine itself exits via a <A HREF="../../lib/Pod/perlfunc.html#item_goto"><CODE>goto</CODE></A>, a loop exit, or a die().
The <CODE>__DIE__</CODE> handler is explicitly disabled during the call, so that you
can die from a <CODE>__DIE__</CODE> handler. Similarly for <CODE>__WARN__</CODE>.</P>
<P>Due to an implementation glitch, the <CODE>$SIG{__DIE__}</CODE> hook is called
even inside an eval(). Do not use this to rewrite a pending exception
in <A HREF="#item_%24%40"><CODE>$@</CODE></A>, or as a bizarre substitute for overriding CORE::GLOBAL::die().
This strange action at a distance may be fixed in a future release
so that <CODE>$SIG{__DIE__}</CODE> is only called if your program is about
to exit, as was the original intent. Any other use is deprecated.</P>
<P><CODE>__DIE__</CODE>/<CODE>__WARN__</CODE> handlers are very special in one respect:
they may be called to report (probable) errors found by the parser.
In such a case the parser may be in inconsistent state, so any
attempt to evaluate Perl code from such a handler will probably
result in a segfault. This means that warnings or errors that
result from parsing Perl should be used with extreme caution, like
this:</P>
<PRE>
require Carp if defined $^S;
Carp::confess("Something wrong") if defined &Carp::confess;
die "Something wrong, but could not load Carp to give backtrace...
To see backtrace try starting Perl with -MCarp switch";</PRE>
<P>Here the first line will load Carp <EM>unless</EM> it is the parser who
called the handler. The second line will print backtrace and die if
Carp was available. The third line will be executed only if Carp was
not available.</P>
<P>See <A HREF="../../lib/Pod/perlfunc.html#die">die in the perlfunc manpage</A>, <A HREF="../../lib/Pod/perlfunc.html#warn">warn in the perlfunc manpage</A>, <A HREF="../../lib/Pod/perlfunc.html#eval">eval in the perlfunc manpage</A>, and
<A HREF="../../lib/warnings.html">the warnings manpage</A> for additional information.</P>
<P>The variables <A HREF="#item_%24%40"><CODE>$@</CODE></A>, <A HREF="#item_%24%21"><CODE>$!</CODE></A>, <A HREF="#item_%24%5EE"><CODE>$^E</CODE></A>, and <A HREF="#item_%24%3F"><CODE>$?</CODE></A> contain information
about different types of error conditions that may appear during
execution of a Perl program. The variables are shown ordered by
the ``distance'' between the subsystem which reported the error and
the Perl process. They correspond to errors detected by the Perl
interpreter, C library, operating system, or an external program,
respectively.</P>
<P>To illustrate the differences between these variables, consider the
following Perl expression, which uses a single-quoted string:</P>
<PRE>
eval q{
open PIPE, "/cdrom/install |";
@res = <PIPE>;
close PIPE or die "bad pipe: $?, $!";
};</PRE>
<P>After execution of this statement all 4 variables may have been set.</P>
<P><A HREF="#item_%24%40"><CODE>$@</CODE></A> is set if the string to be <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval</CODE></A>-ed did not compile (this
may happen if <A HREF="../../lib/Pod/perlfunc.html#item_open"><CODE>open</CODE></A> or <A HREF="../../lib/Pod/perlfunc.html#item_close"><CODE>close</CODE></A> were imported with bad prototypes),
or if Perl code executed during evaluation die()d . In these cases
the value of $@ is the compile error, or the argument to <A HREF="../../lib/Pod/perlfunc.html#item_die"><CODE>die</CODE></A>
(which will interpolate <A HREF="#item_%24%21"><CODE>$!</CODE></A> and <A HREF="#item_%24%3F"><CODE>$?</CODE></A>!). (See also <A HREF="../../lib/Fatal.html">the Fatal manpage</A>,
though.)</P>
<P>When the <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval()</CODE></A> expression above is executed, open(), <CODE><PIPE></CODE>,
and <A HREF="../../lib/Pod/perlfunc.html#item_close"><CODE>close</CODE></A> are translated to calls in the C run-time library and
thence to the operating system kernel. <A HREF="#item_%24%21"><CODE>$!</CODE></A> is set to the C library's
<CODE>errno</CODE> if one of these calls fails.</P>
<P>Under a few operating systems, <A HREF="#item_%24%5EE"><CODE>$^E</CODE></A> may contain a more verbose
error indicator, such as in this case, ``CDROM tray not closed.''
Systems that do not support extended error messages leave <A HREF="#item_%24%5EE"><CODE>$^E</CODE></A>
the same as <A HREF="#item_%24%21"><CODE>$!</CODE></A>.</P>
<P>Finally, <A HREF="#item_%24%3F"><CODE>$?</CODE></A> may be set to non-0 value if the external program
<EM>/cdrom/install</EM> fails. The upper eight bits reflect specific
error conditions encountered by the program (the program's <A HREF="../../lib/Pod/perlfunc.html#item_exit"><CODE>exit()</CODE></A>
value). The lower eight bits reflect mode of failure, like signal
death and core dump information See <A HREF="../../lib/Pod/perlfunc.html#item_wait"><CODE>wait(2)</CODE></A> for details. In
contrast to <A HREF="#item_%24%21"><CODE>$!</CODE></A> and <A HREF="#item_%24%5EE"><CODE>$^E</CODE></A>, which are set only if error condition
is detected, the variable <A HREF="#item_%24%3F"><CODE>$?</CODE></A> is set on each <A HREF="../../lib/Pod/perlfunc.html#item_wait"><CODE>wait</CODE></A> or pipe
<A HREF="../../lib/Pod/perlfunc.html#item_close"><CODE>close</CODE></A>, overwriting the old value. This is more like <A HREF="#item_%24%40"><CODE>$@</CODE></A>, which
on every <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval()</CODE></A> is always set on failure and cleared on success.</P>
<P>For more details, see the individual descriptions at <A HREF="#item_%24%40"><CODE>$@</CODE></A>, <A HREF="#item_%24%21"><CODE>$!</CODE></A>, <A HREF="#item_%24%5EE"><CODE>$^E</CODE></A>,
and <A HREF="#item_%24%3F"><CODE>$?</CODE></A>.</P>
<P>
<H2><A NAME="technical note on the syntax of variable names">Technical Note on the Syntax of Variable Names</A></H2>
<P>Variable names in Perl can have several formats. Usually, they
must begin with a letter or underscore, in which case they can be
arbitrarily long (up to an internal limit of 251 characters) and
may contain letters, digits, underscores, or the special sequence
<CODE>::</CODE> or <CODE>'</CODE>. In this case, the part before the last <CODE>::</CODE> or
<CODE>'</CODE> is taken to be a <EM>package qualifier</EM>; see <A HREF="../../lib/Pod/perlmod.html">the perlmod manpage</A>.</P>
<P>Perl variable names may also be a sequence of digits or a single
punctuation or control character. These names are all reserved for
special uses by Perl; for example, the all-digits names are used
to hold data captured by backreferences after a regular expression
match. Perl has a special syntax for the single-control-character
names: It understands <CODE>^X</CODE> (caret <CODE>X</CODE>) to mean the control-<CODE>X</CODE>
character. For example, the notation <A HREF="#item_%24%5EW"><CODE>$^W</CODE></A> (dollar-sign caret
<CODE>W</CODE>) is the scalar variable whose name is the single character
control-<CODE>W</CODE>. This is better than typing a literal control-<CODE>W</CODE>
into your program.</P>
<P>Finally, new in Perl 5.6, Perl variable names may be alphanumeric
strings that begin with control characters (or better yet, a caret).
These variables must be written in the form <CODE>${^Foo}</CODE>; the braces
are not optional. <CODE>${^Foo}</CODE> denotes the scalar variable whose
name is a control-<CODE>F</CODE> followed by two <CODE>o</CODE>'s. These variables are
reserved for future special uses by Perl, except for the ones that
begin with <CODE>^_</CODE> (control-underscore or caret-underscore). No
control-character name that begins with <CODE>^_</CODE> will acquire a special
meaning in any future version of Perl; such names may therefore be
used safely in programs. <CODE>$^_</CODE> itself, however, <EM>is</EM> reserved.</P>
<P>Perl identifiers that begin with digits, control characters, or
punctuation characters are exempt from the effects of the <A HREF="../../lib/Pod/perlfunc.html#item_package"><CODE>package</CODE></A>
declaration and are always forced to be in package <CODE>main</CODE>. A few
other names are also exempt:</P>
<PRE>
ENV STDIN
INC STDOUT
ARGV STDERR
ARGVOUT
SIG</PRE>
<P>In particular, the new special <CODE>${^_XYZ}</CODE> variables are always taken
to be in package <CODE>main</CODE>, regardless of any <A HREF="../../lib/Pod/perlfunc.html#item_package"><CODE>package</CODE></A> declarations
presently in scope.</P>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P>Due to an unfortunate accident of Perl's implementation, <CODE>use
English</CODE> imposes a considerable performance penalty on all regular
expression matches in a program, regardless of whether they occur
in the scope of <CODE>use English</CODE>. For that reason, saying <CODE>use
English</CODE> in libraries is strongly discouraged. See the
Devel::SawAmpersand module documentation from CPAN