Perldoc Search: "$^" perl-5.20.1

search official POD

21 PODs, 158 LINEs found.
8 :     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 "^X" (caret "X") to mean the control-"X" character. For example, the notation $^W (dollar-sign caret "W") is the scalar variable whose name is the single character control-"W". This is better than typing a literal control-"W" into your program.
10 :     Since Perl v5.6.0, 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 "${^Foo}"; the braces are not optional. "${^Foo}" denotes the scalar variable whose name is a control-"F" followed by two "o"'s. These variables are reserved for future special uses by Perl, except for the ones that begin with "^_" (control-underscore or caret-underscore). No control-character name that begins with "^_" will acquire a special meaning in any future version of Perl; such names may therefore be used safely in programs. $^_ itself, however, *is* reserved.
29 :     Before you continue, note the sort order for variables. In general, we first list the variables in case-insensitive, almost-lexigraphical order (ignoring the "{" or "^" preceding words, as in "${^UNICODE}" or $^T), although $_ and @_ move up to the top of the pile. For variables with the same identifier, we list it in order of scalar, array, hash, and bareword.
204 :                 system($^X, '-e',
210 :     $^F     The maximum system file descriptor, ordinarily 2. System file descriptors are passed to "exec()"ed processes, while higher file descriptors are not. Also, during an "open()", system file descriptors are preserved even if the "open()" fails (ordinary file descriptors are closed before the "open()" is attempted). The close-on-exec status of a file descriptor will be decided according to the value of $^F when the corresponding file, pipe, or socket was opened, not the time of the "exec()".
226 :     $^I     The current value of the inplace-edit extension. Use "undef" to disable inplace editing.
230 :     $^M     By default, running out of memory is an untrappable, fatal error. However, if suitably built, Perl can use the contents of $^M as an emergency memory pool after "die()"ing. Suppose that your Perl were compiled with "-DPERL_EMERGENCY_SBRK" and used Perl's malloc. Then
232 :                 $^M = 'a' x (1 << 16);
239 :     $^O     The name of the operating system under which this copy of Perl was built, as determined during the configuration process. For examples see "PLATFORMS" in perlport.
243 :             In Windows platforms, $^O is not very helpful: since it is always "MSWin32", it doesn't tell the difference between 95/98/ME/NT/2000/XP/CE/.NET. Use "Win32::GetOSName()" or Win32::GetOSVersion() (see Win32 and perlport) to distinguish between the variants.
295 :                 require Carp if defined $^S;
303 :             Having to even think about the $^S variable in your exception handlers is simply wrong. $SIG{__DIE__} as currently implemented invites grievous and difficult to track down errors. Avoid it and use an "END{}" or CORE::GLOBAL::die override instead.
308 :     $^T     The time at which the program began running, in seconds since the epoch (beginning of 1970). The values returned by the -M, -A, and -C filetests are based on this value.
311 :     $^V     The revision, version, and subversion of the Perl interpreter, represented as a "version" object.
313 :             This variable first appeared in perl v5.6.0; earlier versions of perl will see an undefined value. Before perl v5.10.0 $^V was represented as a v-string.
315 :             $^V can be used to determine whether the Perl interpreter executing a script is in the right range of versions. For example:
317 :                 warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1
319 :             To convert $^V into its string representation use "sprintf()"'s "%vd" conversion:
321 :                 printf "version is v%vd\n", $^V;  # Perl's version
339 :     $^X     The name used to execute the current copy of Perl, from C's "argv[0]" or (where supported) /proc/self/exe.
341 :             Depending on the host operating system, the value of $^X may be a relative or absolute pathname of the perl program file, or may be the string used to invoke perl but not the pathname of the perl program file. Also, most operating systems permit invoking programs that are not in the PATH environment variable, so there is no guarantee that the value of $^X is in PATH. For VMS, the value may or may not include a version number.
343 :             You usually can use the value of $^X to re-invoke an independent copy of the same perl that is currently running, e.g.,
345 :                 @first_run = `$^X -le "print int rand 100 for 1..100"`;
349 :             It is not safe to use the value of $^X as a path name of a file, as some operating systems that have a mandatory suffix on executable files do not require use of the suffix when invoking a command. To convert the value of $^X to a path name, use the following statements:
353 :                 my $this_perl = $^X;
354 :                 if ($^O ne 'VMS') {
359 :             Because many operating systems permit anyone with read access to the Perl program file to make a copy of it, patch the copy, and then execute the copy, the security-conscious Perl programmer should take care to invoke the installed copy of perl, not the copy referenced by $^X. The following statements accomplish this goal, and produce a pathname that can be invoked as a command or referenced as a file.
363 :                 if ($^O ne 'VMS') {
514 :     $^N     The text matched by the used group most-recently closed (i.e. the group with the rightmost closing parenthesis) of the last successful search pattern.
518 :                 (?:(...)(?{ $var = $^N }))
602 :     $^R     The result of evaluation of the last successful "(?{ code })" regular expression assertion (see perlre). May be written to.
773 :     $^A     The current value of the "write()" accumulator for "format()" lines. A format contains "formline()" calls that put their result into $^A. After calling its format, "write()" prints out the contents of $^A and empties. So you never really see the contents of $^A unless you call "formline()" yourself and then look at it. See perlform and "formline PICTURE,LIST" in perlfunc.
777 :     $^L     What formats output as a form feed. The default is "\f".
809 :     $^      The name of the current top-of-page format for the currently selected output channel. The default is the name of the filehandle with "_TOP" appended. For example, the default format top name for the "STDOUT" filehandle is "STDOUT_TOP".
817 :             Mnemonic: brother to $^.
820 :     The variables $@, $!, $^E, and $? 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.
834 :     Under a few operating systems, $^E 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 $^E the same as $!.
836 :     Finally, $? may be set to non-0 value if the external program /cdrom/install fails. The upper eight bits reflect specific error conditions encountered by the program (the program's "exit()" value). The lower eight bits reflect mode of failure, like signal death and core dump information. See wait(2) for details. In contrast to $! and $^E, which are set only if error condition is detected, the variable $? is set on each "wait" or pipe "close", overwriting the old value. This is more like $@, which on every "eval()" is always set on failure and cleared on success.
838 :     For more details, see the individual descriptions at $@, $!, $^E, and $?.
848 :     $^E     Error information specific to the current operating system. At the moment, this differs from $! under only VMS, OS/2, and Win32 (and for MacPerl). On all other platforms, $^E is always just the same as $!.
850 :             Under VMS, $^E provides the VMS status value from the last system error. This is more specific information about the last system error than that provided by $!. This is particularly important when $! is set to EVMSERR.
852 :             Under OS/2, $^E is set to the error code of the last call to OS/2 API either via CRT, or directly from perl.
854 :             Under Win32, $^E always returns the last error information reported by the Win32 call "GetLastError()" which describes the last error from within the Win32 API. Most Win32-specific code will report errors via $^E. ANSI C and Unix-like calls set "errno" and so most portable Perl code will report errors via $!.
856 :             Caveats mentioned in the description of $! generally apply to $^E, also.
863 :     $^S     Current state of the interpreter.
865 :                     $^S         State
878 :     $^W     The current value of the warning switch, initially true if -w was used, false otherwise, but directly modifiable.
885 :             The current set of warning checks enabled by the "use warnings" pragma. It has the same scoping as the $^H and "%^H" variables. The exact values are considered internal to the warnings pragma and may change between versions of Perl.
947 :     $^C     The current value of the flag associated with the -c switch. Mainly of use with -MO=... to allow code to alter its behavior when being compiled, such as for example to "AUTOLOAD" at compile time rather than normal, deferred loading. Setting "$^C = 1" is similar to calling "B::minus_c".
952 :     $^D     The current value of the debugging flags. May be read or set. Like its command-line equivalent, you can use numeric or symbolic values, eg "$^D = 10" or "$^D = "st"".
1034 :     $^H     WARNING: This variable is strictly for internal use only. Its availability, behavior, and contents are subject to change without notice.
1038 :             When perl begins to parse any block construct that provides a lexical scope (e.g., eval body, required file, subroutine body, loop body, or conditional block), the existing value of $^H is saved, but its value is left unchanged. When the compilation of the block is completed, it regains the saved value. Between the points where its value is saved and restored, code that executes within BEGIN blocks is free to change the value of $^H.
1044 :                 sub add_100 { $^H |= 0x100 }
1051 :             Consider what happens during execution of the BEGIN block. At this point the BEGIN block has already been compiled, but the body of "foo()" is still being compiled. The new value of $^H will therefore be visible only while the body of "foo()" is being compiled.
1065 :     %^H     The "%^H" hash provides the same scoping semantic as $^H. This makes it useful for implementation of lexically scoped pragmas. See perlpragma.
1077 :     $^P     The internal variable for debugging support. The meanings of the various bits are subject to change, but currently indicate:
1167 :     $]      See "$^V" for a more modern representation of the Perl version that allows accurate string comparisons.
214 :     Don't count on a specific environment variable existing in %ENV. Don't count on %ENV entries being case-sensitive, or even case-preserving. Don't try to clear %ENV by saying "%ENV = ();", or, if you really have to, make it conditional on "$^O ne 'VMS'" since in VMS the %ENV table is much more than a per-process key-value string table.
229 :     Don't assume that the name used to invoke a command or program with "system" or "exec" can also be used to test for the existence of the file that holds the executable code for that command or program. First, many systems have "internal" commands that are built-in to the shell or OS and while these commands can be invoked, there is no corresponding file. Second, some operating systems (e.g., Cygwin, DJGPP, OS/2, and VOS) have required suffixes for executable files; these suffixes are generally permitted on the command name but are not required. Thus, a command like "perl" might exist in a file named "perl", "perl.exe", or "", depending on the operating system. The variable "_exe" in the Config module holds the executable suffix, if any. Third, the VMS port carefully sets up $^X and $Config{perlpath} so that no further processing is required. This is just as well, because the matching regular expression used below would then have to deal with a possible trailing version number in the VMS file name.
231 :     To convert $^X to a file pathname, taking account of the requirements of the various operating system possibilities, say:
234 :      my $thisperl = $^X;
235 :      if ($^O ne 'VMS')
242 :      if ($^O ne 'VMS')
350 :     For those times when it is necessary to have platform-specific code, consider keeping the platform-specific code in one place, making porting to other platforms easier. Use the Config module and the special variable $^O to differentiate platforms, as described in "PLATFORMS".
366 :     Perl is built with a $^O variable that indicates the operating system it was built on. This was implemented to help speed up code that would otherwise have to "use Config" and use the value of $Config{osname}. Of course, to get more detailed information about the system, looking into %Config is certainly recommended.
371 :     Perl works on a bewildering variety of Unix and Unix-like platforms (see e.g. most of the files in the hints/ directory in the source code kit). On most of these systems, the value of $^O (hence $Config{'osname'}, too) is determined either by lowercasing and stripping punctuation from the first field of the string returned by typing "uname -a" (or a similar command) at the shell prompt or by testing the file system for the presence of uniquely named files such as a kernel or header file. Here, for example, are a few of the more popular Unix flavors:
373 :         uname         $^O        $Config{'archname'}
403 :     Because the value of $Config{archname} may depend on the hardware architecture, it can vary more than the value of $^O.
423 :     The $^O variable and the $Config{archname} values for various DOSish perls are as follows:
425 :          OS            $^O      $Config{archname}   ID    Version
450 :         if ($^O eq 'MSWin32') {
562 :     The value of $^O on OpenVMS is "VMS". To determine the architecture that you are running on without resorting to loading all of %Config you can examine the content of the @INC array like so:
574 :             print "I'm not so sure about where $^O is...\n";
605 :     The value of $^O on VOS is "vos". To determine the architecture that you are running on without resorting to loading all of %Config you can examine the content of the @INC array like so:
607 :         if ($^O =~ /vos/) {
654 :     The values of $^O on some of these platforms includes:
656 :         uname         $^O        $Config{'archname'}
723 :     "RISC OS" is the proper name for the operating system, but the value in $^O is "riscos" (because we don't like shouting).
728 :     Some approximate operating system names and their $^O values in the "OTHER" category include:
730 :         OS            $^O        $Config{'archname'}
210 :         On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor, as determined by the value of $^F. See "$^F" in perlvar.
315 :         Here, $subroutine is the function that the caller called (rather than the function containing the caller). Note that $subroutine may be "(eval)" if the frame is not a subroutine call, but an "eval". In such a case additional elements $evaltext and $is_require are set: $is_require is true if the frame is created by a "require" or "use" statement, $evaltext contains the text of the "eval EXPR" statement. In particular, for an "eval BLOCK" statement, $subroutine is "(eval)", but $evaltext is undefined. (Note also that each "use" statement creates a "require" frame inside an "eval EXPR" frame.) $subroutine may also be "(unknown)" if this particular subroutine happens to have been deleted from the symbol table. $hasargs is true if a new instance of @_ was set up for the frame. $hints and $bitmask contain pragmatic hints that the caller was compiled with. $hints corresponds to $^H, and $bitmask corresponds to "${^WARNING_BITS}". The $hints and $bitmask values are subject to change between versions of Perl, and are not meant for external use.
707 :             die @_ if $^S;
709 :         as the first line of the handler (see "$^S" in perlvar). Because this promotes strange action at a distance, this counterintuitive behavior may be fixed in a future release.
1173 :         This is an internal function used by "format"s, though you may call it, too. It formats (see perlform) a list of values according to the contents of PICTURE, placing the output into the format output accumulator, $^A (or $ACCUMULATOR in English). Eventually, when a "write" is done, the contents of $^A are written to some filehandle. You could also read $^A and then set $^A back to "". Note that a format typically does one "formline" per line of form, but the "formline" function itself doesn't care how many newlines are embedded in the PICTURE. This means that the "~" and "~~" tokens treat the entire PICTURE as a single line. You may therefore need to use multiple formlines to implement a single record format, just like the "format" compiler.
2086 :         On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor as determined by the value of $^F. See "$^F" in perlvar.
2608 :         On systems that support a close-on-exec flag on files, that flag is set on all newly opened file descriptors whose "fileno"s are *higher* than the current value of $^F (by default 2 for "STDERR"). See "$^F" in perlvar.
2903 :         VERSION may be either a numeric argument such as 5.006, which will be compared to $], or a literal of the form v5.6.1, which will be compared to $^V (aka $PERL_VERSION). An exception is raised if VERSION is greater than the version of the current Perl interpreter. Compare with "use", which can do a similar check at compile time.
2920 :                     if ( $version > $^V ) {
2922 :                        croak "Perl $vn required--this is only $^V, stopped";
3151 :             $^ = 'report1_top';
3153 :             $^ = 'report2_top';
3339 :         On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor, as determined by the value of $^F. See "$^F" in perlvar.
3344 :         On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptors, as determined by the value of $^F. See "$^F" in perlvar.
3722 :               printf "version is v%vd\n", $^V;     # Perl's version
4510 :         In the peculiar "use VERSION" form, VERSION may be either a positive decimal fraction such as 5.006, which will be compared to $], or a v-string of the form v5.6.1, which will be compared to $^V (aka $PERL_VERSION). An exception is raised if VERSION is greater than the version of the current Perl interpreter; Perl will not attempt to parse the rest of the file. Compare with "require", which can do a similar check at run time. Symmetrically, "no VERSION" allows you to specify that you want a version of Perl older than the specified one.
4886 :         Top of form processing is handled automatically: if there is insufficient room on the current page for the formatted record, the page is advanced by writing a form feed and a special top-of-page format is used to format the new page header before the record is written. By default, the top-of-page format is the name of the filehandle with "_TOP" appended, or "top" in the current package if the former does not exist. This would be a problem with autovivified filehandles, but it may be dynamically set to the format of your choice by assigning the name to the $^ variable while that filehandle is selected. The number of lines remaining on the current page is in variable $-, which can be set to 0 to force a new page.
447 :     Several special variables also refer back to portions of the previous match. $+ returns whatever the last bracket match matched. $& returns the entire matched string. (At one point $0 did also, but now it returns the name of the program.) $` returns everything before the matched string. $' returns everything after the matched string. And $^N contains whatever was matched by the most-recently closed group (submatch). $^N can be used in extended patterns (see below), for example to assign a submatch to a variable.
643 :         This zero-width assertion executes any embedded Perl code. It always succeeds, and its return value is set as $^R.
712 :         switch. If *not* used in this way, the result of evaluation of "code" is put into the special variable $^R. This happens immediately, so $^R can be used from other "(?{ code })" assertions inside the same regular expression.
714 :         The assignment to $^R above is properly localized, so the old value of $^R is restored if the assertion is backtracked; compare "Backtracking".
716 :         Note that the special variable $^N is particularly useful with code blocks to capture the results of submatches in variables without having to keep track of the number of nested parentheses. For example:
719 :           /the (\S+)(?{ $color = $^N }) (\S+)(?{ $animal = $^N })/i;
725 :         This is a "postponed" regular subexpression. It behaves in *exactly* the same way as a "(?{ code })" code block as described above, except that its return value, rather than being assigned to $^R, is treated as a pattern, compiled if it's a string (or used as-is if its a qr// object), then matched as if it were inserted instead of this construct.
146 :     The current format name is stored in the variable $~ ($FORMAT_NAME), and the current top of form format name is in $^ ($FORMAT_TOP_NAME). The current output page number is stored in $% ($FORMAT_PAGE_NUMBER), and the number of lines on the page is in $= ($FORMAT_LINES_PER_PAGE). Whether to autoflush output on this handle is stored in $| ($OUTPUT_AUTOFLUSH). The string output before each top of page (except the first) is stored in $^L ($FORMAT_FORMFEED). These variables are set on a per-filehandle basis, so you'll need to select() into a different one to affect them:
150 :                 $^ = "My_Top_Format"
157 :         $^ = "My_Top_Format";
241 :     For low-level access to the formatting mechanism, you may use formline() and access $^A (the $ACCUMULATOR variable) directly.
249 :         print "Wow, I just stored '$^A' in the accumulator!\n";
257 :             $^A = "";
259 :             return $^A;
397 :     For convenience, Perl sets $+ to the string held by the highest numbered $1, $2,... that got assigned (and, somewhat related, $^N to the value of the $1, $2,... most-recently assigned; i.e. the $1, $2,... associated with the rightmost closing parenthesis used in the match).
1355 :     Code expressions are zero-width assertions, and the value they return depends on their environment. There are two possibilities: either the code expression is used as a conditional in a conditional expression "(?(condition)...)", or it is not. If the code expression is a conditional, the code is evaluated and the result (i.e., the result of the last statement) is used to determine truth or falsehood. If the code expression is not used as a conditional, the assertion always evaluates true and the result is put into the special variable $^R. The variable $^R can then be used in code expressions later in the regexp. Here are some silly examples:
1386 :         $x =~ /(?{$c = 1;})(?{print "$^R";})/; # matches,
1423 :     The result $^R is automatically localized, so that it will behave properly in the presence of backtracking.
1483 :                            (?{ $z0 = $z1; $z1 .= $^N; })
1489 :     Remember that $^N is set to whatever was matched by the last completed capture group. This prints
1500 :         /^1(?:((??{ $z0 }))1(?{ $z0 = $z1; $z1 .= $^N; }))+$/
93 :         (D deprecated) You defined a character name which had multiple space characters in a row. Change them to single spaces. Usually these names are defined in the ":alias" import argument to "use charnames", but they could be defined by a translator installed into $^H{charnames}. See "CUSTOM ALIASES" in charnames.
750 :     Constant(%s): Call to &{$^H{%s}} did not return a defined value
753 :     Constant(%s): $^H{%s} is not defined
1945 :         The request was judged to be small, so the possibility to trap it depends on the way perl was compiled. By default it is not trappable. However, if compiled for this, Perl may use the contents of $^M as an emergency pool after die()ing with this message. In this case the error is trappable *once*, and the error message will include the line and file where the failed request happened.
2889 :         (D deprecated) You defined a character name which ended in a space character. Remove the trailing space(s). Usually these names are defined in the ":alias" import argument to "use charnames", but they could be defined by a translator installed into $^H{charnames}. See "CUSTOM ALIASES" in charnames.
3355 :         (D deprecated) Using literal control characters in the source to refer to the ^FOO variables, like $^X and "${^GLOBAL_PHASE}" is now deprecated. This only affects code like "$\cT", where \cT is a control in the source code: "${"\cT"}" and $^T remain valid.
48 :                     carp "Nice::Tie::Scalar got non-numeric pid $pid" if $^W;
53 :                     carp "Nice::Tie::Scalar got bad pid $pid: $!" if $^W;
60 :         This tie class has chosen to return an error rather than raising an exception if its constructor should fail. While this is how dbmopen() works, other classes may well not wish to be so forgiving. It checks the global variable $^W to see whether to emit a bit of noise anyway.
90 :                           $new_nicety, PRIO_MIN if $^W;
97 :                           $new_nicety, PRIO_MAX if $^W;
79 :     OpenVMS Alpha v7.3-1 and later and all version of OpenVMS I64 support case sensitivity as a process setting (see "SET PROCESS /CASE_LOOKUP=SENSITIVE"). Perl does not currently support case sensitivity on VMS, but it may in the future, so Perl programs should use the "File::Spec->case_tolerant" method to determine the state, and not the $^O variable.
271 :         When "PERL_VMS_POSIX_EXIT" is active (see "$?" below), the native VMS exit status value will have either one of the $! or $? or $^E or the Unix value 255 encoded into it in a way that the effective original value can be decoded by other programs written in C, including Perl and the GNV package. As per the normal non-VMS behavior of "die" if either $! or $? are non-zero, one of those values will be encoded into a native VMS status value. If both of the Unix status values are 0, and the $^E value is set one of ERROR or SEVERE_ERROR severity, then the $^E value will be used as the exit code as is. If none of the above apply, the Unix value of 255 will be encoded into a native VMS exit status value.
407 :     $^E This variable provides direct access to VMS status values in vaxc$errno, which are often more specific than the generic Unix-style error messages in $!. Its numeric value is the value of vaxc$errno, and its string value is the corresponding VMS message string, as retrieved by sys$getmsg(). Setting $^E sets vaxc$errno to the value specified.
439 :         With the "PERL_VMS_POSIX_EXIT" logical name defined as "ENABLE", setting $? will cause the new value to be encoded into $^E so that either the original parent or child exit status values 0 to 255 can be automatically recovered by C programs expecting _POSIX_EXIT behavior. If both a parent and a child exit value are non-zero, then it will be assumed that this is actually a VMS native status value to be passed through. The special value of 0xFFFF is almost a NOOP as it will cause the current native VMS status in the C library to become the current native Perl VMS status, and is handled this way as it is known to not be a valid native VMS status value. It is recommend that only values in the range of normal Unix parent or child status numbers, 0 to 255 are used.
487 :          This switch really just enables the global $^W variable; normally, the lexically scoped "use warnings" pragma is preferred. You can disable or promote into fatal errors specific warnings using "__WARN__" hooks, as described in perlvar and "warn" in perlfunc. See also perldiag and perltrap. A fine-grained warning facility is also available if you want to manipulate entire classes of warnings; see warnings.
489 :     -W   Enables all warnings regardless of "no warnings" or $^W. See warnings.
491 :     -X   Disables all warnings regardless of "use warnings" or $^W. See warnings.
216 :        (?{ code })       Embedded code, return value becomes $^R
253 :        $^N   Holds the most recently closed capture
254 :        $^R   Holds the result of the last (?{...}) expr
10 :     For example, whenever you call Perl's built-in "caller" function from the package "DB", the arguments that the corresponding stack frame was called with are copied to the @DB::args array. These mechanisms are enabled by calling Perl with the -d switch. Specifically, the following additional features are enabled (cf. "$^P" in perlvar):
30 :     *   When the execution of your program reaches a point that can hold a breakpoint, the "DB::DB()" subroutine is called if any of the variables $DB::trace, $DB::single, or $DB::signal is true. These variables are not "local"izable. This feature is disabled when executing inside "DB::DB()", including functions called from it unless "$^D & (1<<30)" is true.
36 :     *   When execution of the program uses "goto" to enter a non-XS subroutine and the 0x80 bit is set in $^P, a call to &DB::goto is made, with $DB::sub holding the name of the subroutine being entered.
54 :     In order to install a new regexp handler, $^H{regcomp} is set to an integer which (when casted appropriately) resolves to one of these structures. When compiling, the "comp" method is executed, and the resulting "regexp" structure's engine field is expected to point back at the same structure.
403 :             U32 lastcloseparen;       /* last close paren matched ($^N) */
436 :     Internally this is set to "NULL" unless a custom engine is specified in $^H{regcomp}, Perl's own set of callbacks can be accessed in the struct pointed to by "RE_ENGINE_PTR".
1373 :         A common mistake is to try to separate the words with comma or to put comments into a multi-line "qw"-string. For this reason, the "use warnings" pragma and the -w switch (that is, the $^W variable) produces warnings if the STRING contains the "," or the "#" character.
1619 :             It is at this step that "\1" is begrudgingly converted to $1 in the replacement text of "s///", in order to correct the incorrigible *sed* hackers who haven't picked up the saner idiom yet. A warning is emitted if the "use warnings" pragma or the -w command-line flag (that is, the $^W variable) was set.
1690 :     In other boolean contexts, "<FILEHANDLE>" without an explicit "defined" test or comparison elicits a warning if the "use warnings" pragma or the -w command-line switch (the $^W variable) is in effect.
73 :             $^H{"myint/in_effect"} = 1;
77 :             $^H{"myint/in_effect"} = 0;
104 :     User pragmata store their state by writing to the magical hash "%^H", hence these two routines manipulate it. The state information in "%^H" is stored in the optree, and can be retrieved read-only at runtime with "caller()", at index 10 of the list of returned results. In the example pragma, retrieval is encapsulated into the routine "in_effect()", which takes as parameter the number of call frames to go up to find the value of the pragma in the user's script. This uses "caller()" to determine the value of $^H{"myint/in_effect"} when each line of the user's script was called, and therefore provide the correct semantics in the subroutine implementing the overloaded addition.
28 :         This is used by Perl itself only for accessing operating system error messages via $! and $^E.
73 :         *   The variables $! (and its synonyms $ERRNO and $OS_ERROR) and $^E (and its synonym $EXTENDED_OS_ERROR) when used as strings always are in terms of the current locale and as if within the scope of "use bytes". This is likely to change in Perl v5.22.
203 :         Renders code in a typewriter font, or gives some other indication that this represents program text (""C<gmtime($^T)>"") or some other form of computerese (""C<drwxr-xr-x>"").
729 :      #define SAY_HELLO "-e", "print qq(Hi, I'm $^X\n)"
471 :     Certain built-in Unix features help prevent this most of the time. For instance, filehandles have a "close on exec" flag, which is set *en masse* under control of the $^F variable. This is so any filehandles you didn't explicitly route to the STDIN, STDOUT or STDERR of a child *program* will be automatically closed.
7 :     The most important thing is to run your programs under the -w flag at all times. You may turn it off explicitly for particular portions of code via the "no warnings" pragma or the $^W variable if you must. You should also always run under "use strict" or know the reason why not. The "use sigtrap" and even "use diagnostics" pragmas may also prove useful.
92 :     A sigil, followed by either a caret and a single POSIX uppercase letter, like $^V or $^W, or a sigil followed by a literal control character matching the "\p{POSIX_Cntrl}" property. Due to a historical oddity, if not running under "use utf8", the 128 extra controls in the "[0x80-0xff]" range may also be used in length one variables. The use of a literal control character is deprecated. Support for this form will be removed in a future version of perl.
<< Back to Perldoc Search