Perldoc Search: "$ENV" perl-5.20.1

search official POD


18 PODs, 74 LINEs found.
perlvms.pod
104 :     The mailbox (MBX) that perl can create to communicate with a pipe defaults to a buffer size of 8192 on 64-bit systems, 512 on VAX. The default buffer size is adjustable via the logical name PERL_MBX_SIZE provided that the value falls between 128 and the SYSGEN parameter MAXBUF inclusive. For example, to set the mailbox size to 32767 use "$ENV{'PERL_MBX_SIZE'} = 32767;" and then open and use pipe constructs. An alternative would be to issue the command:
357 :         The operation of the %ENV array depends on the translation of the logical name PERL_ENV_TABLES. If defined, it should be a search list, each element of which specifies a location for %ENV elements. If you tell Perl to read or set the element "$ENV{"*name*"}", then Perl uses the translations of PERL_ENV_TABLES as follows:
376 :            _$ -e "{ print $ENV{'story;'.$i},' '}"
384 :         The element $ENV{DEFAULT} is special: when read, it returns Perl's current default device and directory, and when set, it resets them, regardless of the definition of PERL_ENV_TABLES. It cannot be cleared or deleted; attempts to do so are silently ignored.
389 :                 my $temp = $ENV{$key}; # read from C-local array
390 :                 $ENV{$key} = $temp;    # and define as logical name
393 :         (You can't just say $ENV{$key} = $ENV{$key}, since the Perl optimizer is smart enough to elide the expression.)
perldiag.pod
395 :         (W exec) A system(), exec(), or piped open call could not execute the named program for the indicated reason. Typical reasons include: the permissions were wrong on the file, the file wasn't found in $ENV{PATH}, the executable in question was compiled for another architecture, or the #! line in a script points to an interpreter that can't be run for similar reasons. (Or maybe your system doesn't support #! at all.)
1231 :         (F) You can't use system(), exec(), or a piped open in a setuid or setgid script if $ENV{PATH} contains a directory that is writable by the world. Also, the PATH must not contain any relative directory. See perlsec.
1233 :     Insecure $ENV{%s} while running %s
1234 :         (F) You can't use system(), exec(), or a piped open in a setuid or setgid script if any of $ENV{PATH}, $ENV{IFS}, $ENV{CDPATH}, $ENV{ENV}, $ENV{BASH_ENV} or $ENV{TERM} are derived from data supplied (or potentially supplied) by the user. The script must set the path to a known value, using trustworthy data. See perlsec.
2168 :     perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set
2183 :     perl: warning: strange setting in '$ENV{PERL_PERTURB_KEYS}': '%s'
3301 :         (D deprecated) chdir() with no arguments is documented to change to $ENV{HOME} or $ENV{LOGDIR}. chdir(undef) and chdir('') share this behavior, but that has been deprecated. In future versions they will simply fail.
perlfunc.pod
329 :         Changes the working directory to EXPR, if possible. If EXPR is omitted, changes to the directory specified by $ENV{HOME}, if set; if not, changes to the directory specified by $ENV{LOGDIR}. (Under VMS, the variable $ENV{SYS$LOGIN} is also checked, and used if it is set.) If neither is set, "chdir" does nothing. It returns true on success, false otherwise. See the example under "die".
564 :             dbmopen(%NS_Hist, "$ENV{HOME}/.netscape/history.db")
737 :                        "$ENV{HOME}/.someprogrc")
788 :                 print "$_=$ENV{$_}\n";
847 :         If you want to trap errors when loading an XS module, some problems with the binary interface (such as Perl version skew) may be fatal even with "eval" unless $ENV{PERL_DL_NONLAZY} is set. See perlrun.
1131 :             open(my $mbox, ">>", "/usr/spool/mail/$ENV{'USER'}")
1505 :                 print $key, '=', $ENV{$key}, "\n";
perlsec.pod
45 :         $path = $ENV{'PATH'};       # Tainted, but see below
54 :         $path = $ENV{'PATH'};       # $path now tainted
56 :         $ENV{'PATH'} = '/bin:/usr/bin';
59 :         $path = $ENV{'PATH'};       # $path now NOT tainted
87 :     If you try to do something insecure, you will get a fatal error saying something like "Insecure dependency" or "Insecure $ENV{PATH}".
144 :     For "Insecure $ENV{PATH}" messages, you need to set $ENV{'PATH'} to a known value, and each directory in the path must be absolute and non-writable by others than its owner and group. You may be surprised to get this message even if the pathname to your executable is fully qualified. This is *not* generated because you didn't supply a full path to the program; instead, it's generated because you never set your PATH environment variable, or you didn't set it to something that was safe. Because Perl can't guarantee that the executable in question isn't itself going to turn around and execute some other program that is dependent on your PATH, it makes sure you set the PATH.
178 :                 $ENV{PATH} = "/bin:/usr/bin"; # Minimal PATH.
perlpacktut.pod
449 :        my $env = pack( '(A*A*Z*)' . keys( %Env ) . 'C',
450 :                        map( { ( $_, '=', $Env{$_} ) } keys( %Env ) ), 0 );
452 :     Let's examine the cogs of this byte mill, one by one. There's the "map" call, creating the items we intend to stuff into the $env buffer: to each key (in $_) it adds the "=" separator and the hash entry value. Each triplet is packed with the template code sequence "A*A*Z*" that is repeated according to the number of keys. (Yes, that's what the "keys" function returns in scalar context.) To get the very last null byte, we add a 0 at the end of the "pack" list, to be packed with "C". (Attentive readers may have noticed that we could have omitted the 0.)
456 :        my $n = $env =~ tr/\0// - 1;
457 :        my %env = map( split( /=/, $_ ), unpack( "(Z*)$n", $env ) );
464 :        my $env = pack( 'S(S/A* S/A*)*', scalar keys( %Env ), %Env );
468 :        my %env = unpack( 'S/(S/A* S/A*)', $env );
perlhacktips.pod
762 :     Unless "-DPERL_MEM_LOG_NOIMPL" is also compiled, the logging functions read $ENV{PERL_MEM_LOG} to determine whether to log the event, and if so how:
764 :         $ENV{PERL_MEM_LOG} =~ /m/           Log all memory ops
765 :         $ENV{PERL_MEM_LOG} =~ /s/           Log all SV ops
766 :         $ENV{PERL_MEM_LOG} =~ /t/           include timestamp in Log
767 :         $ENV{PERL_MEM_LOG} =~ /^(\d+)/      write to FD given (default is 2)
perlport.pod
216 :     On VMS, some entries in the %ENV hash are dynamically created when their key is used on a read if they did not previously exist. The values for $ENV{HOME}, $ENV{TERM}, $ENV{HOME}, and $ENV{USER}, are known to be dynamically generated. The specific names that are dynamically generated may vary with the version of the C library on VMS, and more may exist than is documented.
301 :     The system's notion of time of day and calendar date is controlled in widely different ways. Don't assume the timezone is stored in $ENV{TZ}, and even if it is, don't assume that you can control the timezone through that variable. Don't assume anything about the three-letter timezone abbreviations (for example that MST would be the Mountain Standard Time, it's been known to stand for Moscow Standard Time). If you need to use timezones, express them in some unambiguous format like the exact number of minutes offset from UTC, or the POSIX timezone format.
502 :         $ then perl -x 'f$environment("PROCEDURE")
702 :     Logical paths specified by system variables containing comma-separated search lists are also allowed; hence "System:Modules" is a valid filename, and the filesystem will prefix "Modules" with each section of "System$Path" until a name is made that points to an object on disk. Writing to a new file "System:Modules" would be allowed only if "System$Path" contains a single item list. The filesystem will also expand system variables in filenames if enclosed in angle brackets, so "<System$Dir>.Modules" would look for the file "$ENV{'System$Dir'} . 'Modules'". The obvious implication of this is that fully qualified filenames can start with "<>" and should be protected when "open" is used for input.
1053 :     system  As an optimization, may not call the command shell specified in $ENV{PERL5SHELL}. "system(1, @args)" spawns an external process and immediately returns its process designator, without waiting for it to terminate. Return value may be used subsequently in "wait" or "waitpid". Failure to spawn() a subprocess is indicated by setting $? to "255 << 8". $? is set in a way compatible with Unix (i.e. the exitstatus of the subprocess is obtained by "$? >> 8", as described in the documentation). (Win32)
perldebug.pod
246 :     !! cmd      Run cmd in a subprocess (reads from DB::IN, writes to DB::OUT) See "o shellBang", also. Note that the user's current shell (well, their $ENV{SHELL} variable) will be used, which can interfere with proper interpretation of exit status or signal and coredump information.
290 :     "pager"     Program to use for output of pager-piped commands (those beginning with a "|" character.) By default, $ENV{PAGER} will be used. Because the debugger uses your current terminal characteristics for bold and underlining, if the chosen pager does not pass escape sequences through unchanged, the output of some debugger commands will not be readable when sent through the pager.
352 :     After the rc file is read, the debugger reads the $ENV{PERLDB_OPTS} environment variable and parses this as the remainder of a "O ..." line as one might enter at the debugger prompt. You may place the initialization options "TTY", "noTTY", "ReadLine", and "NonStop" there.
364 :                 This module should implement a method named "new" that returns an object with two methods: "IN" and "OUT". These should return filehandles to use for debugging input and output correspondingly. The "new" method should inspect an argument containing the value of $ENV{PERLDB_NOTTY} at startup, or "$ENV{HOME}/.perldbtty$$" otherwise. This file is not inspected for proper ownership, so security hazards are theoretically possible.
370 :     Here's an example of using the $ENV{PERLDB_OPTS} variable:
perlrun.pod
63 :          $ perl -mysw 'f$env("procedure")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !
592 :                 Before Perl 5.10.0 and 5.8.8, PERL5SHELL was not taint checked when running external commands. It is recommended that you explicitly set (or delete) $ENV{PERL5SHELL} when running in taint mode under Windows.
665 :         $ENV{PATH}  = "/bin:/usr/bin";    # or whatever you need
666 :         $ENV{SHELL} = "/bin/sh" if exists $ENV{SHELL};
perlvar.pod
191 :                 $ENV{'bar'} = \$foo;
192 :                 if( ref $ENV{'bar'} ) {
201 :                 $ENV{'bar'} = \$foo;
205 :                        q/print ( ref $ENV{'bar'}  ? 'ref' : 'non ref' ) /);
perlipc.pod
211 :         $ENV{PATH} .= ":/etc:/usr/etc";
611 :         BEGIN { $ENV{PATH} = "/usr/bin:/bin" }
651 :         BEGIN { $ENV{PATH} = "/usr/bin:/bin" }
808 :         BEGIN { $ENV{PATH} = "/usr/bin:/bin" }
perldebguts.pod
12 :     *   Perl inserts the contents of $ENV{PERL5DB} (or "BEGIN {require 'perl5db.pl'}" if not present) before the first line of your program.
645 :     If Perl has been compiled using Perl's malloc you can analyze Perl memory usage by setting $ENV{PERL_DEBUG_MSTATS}.
647 :   Using $ENV{PERL_DEBUG_MSTATS}
648 :     If your perl is using Perl's malloc() and was compiled with the necessary switches (this is the default), then it will print memory usage statistics after compiling your code when "$ENV{PERL_DEBUG_MSTATS} > 1", and before termination of the program when "$ENV{PERL_DEBUG_MSTATS} >= 1". The report format is similar to the following example:
perlop.pod
502 :         $home =  $ENV{HOME}
503 :               // $ENV{LOGDIR}
perlapio.pod
259 :         PerlIO_debug writes to the file named by $ENV{'PERLIO_DEBUG'} typical use might be
275 :         If $ENV{'PERLIO_DEBUG'} is not set PerlIO_debug() is a no-op.
perlmodinstall.pod
128 :         Then move the files (probably just the .pm files, though there may be some additional ones, too; check the module documentation) to their final destination: This will most likely be in "$ENV{MACPERL}site_lib:" (i.e., "HD:MacPerl folder:site_lib:"). You can add new paths to the default @INC in the Preferences menu item in the MacPerl application ("$ENV{MACPERL}site_lib:" is added automagically). Create whatever directory structures are required (i.e., for "Some::Module", create "$ENV{MACPERL}site_lib:Some:" and put "Module.pm" in that directory).
perlfilter.pod
244 :              Enabled => defined $ENV{DEBUG},
perlsyn.pod
308 :         foreach $item (split(/:[\\\n:]*/, $ENV{TERMCAP})) {
perluniintro.pod
176 :         BEGIN { $ENV{LC_ALL} = $ENV{LANG} = 'ru_RU.KOI8-R' }
<< Back to Perldoc Search