X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fperlvms.pod;h=377d97f6feb4182b979af41b30b554bc54267d7b;hb=d896966de2ebabc4abc3d080ae3c7ee77c51781e;hp=47ee3d3afdcb16100a6e1981a03585638c672b88;hpb=c07a80fdfe3926b5eb0585b674aa5d1f57b32ade;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/perlvms.pod b/vms/perlvms.pod index 47ee3d3..377d97f 100644 --- a/vms/perlvms.pod +++ b/vms/perlvms.pod @@ -242,45 +242,6 @@ documented L, except that the element separator is '|' instead of ':'. The directory specifications may use either VMS or Unix syntax. -=head1 %ENV - -Reading the elements of the %ENV array returns the -translation of the logical name specified by the key, -according to the normal search order of access modes and -logical name tables. If you append a semicolon to the -logical name, followed by an integer, that integer is -used as the translation index for the logical name, -so that you can look up successive values for search -list logical names. For instance, if you say - - $ Define STORY once,upon,a,time,there,was - $ perl -e "for ($i = 0; $i <= 6; $i++) " - - _$ -e "{ print $ENV{'foo'.$i},' '}" - -Perl will print C. - -The %ENV keys C, C,C, and C -return the CRTL "environment variables" of the same -names, if these logical names are not defined. The -key C returns the current default device -and directory specification, regardless of whether -there is a logical name DEFAULT defined.. - -Setting an element of %ENV defines a supervisor-mode logical -name in the process logical name table. Cing or -Cing an element of %ENV deletes the equivalent user- -mode or supervisor-mode logical name from the process logical -name table. If you use C, the %ENV element remains -empty. If you use C, another attempt is made at -logical name translation after the deletion, so an inner-mode -logical name or a name in another logical name table will -replace the logical name just deleted. It is not possible -at present to define a search list logical name via %ENV. - -In all operations on %ENV, the key string is treated as if it -were entirely uppercase, regardless of the case actually -specified in the Perl expression. - =head1 Perl functions As of the time this document was last revised, the following @@ -558,6 +519,67 @@ and you invoked Perl with the C<-w> switch, a warning will be issued.) The FLAGS argument is ignored in all cases. +=head1 Perl variables + +=item %ENV + +Reading the elements of the %ENV array returns the +translation of the logical name specified by the key, +according to the normal search order of access modes and +logical name tables. If you append a semicolon to the +logical name, followed by an integer, that integer is +used as the translation index for the logical name, +so that you can look up successive values for search +list logical names. For instance, if you say + + $ Define STORY once,upon,a,time,there,was + $ perl -e "for ($i = 0; $i <= 6; $i++) " - + _$ -e "{ print $ENV{'foo'.$i},' '}" + +Perl will print C. + +The %ENV keys C, C,C, and C +return the CRTL "environment variables" of the same +names, if these logical names are not defined. The +key C returns the current default device +and directory specification, regardless of whether +there is a logical name DEFAULT defined.. + +Setting an element of %ENV defines a supervisor-mode logical +name in the process logical name table. Cing or +Cing an element of %ENV deletes the equivalent user- +mode or supervisor-mode logical name from the process logical +name table. If you use C, the %ENV element remains +empty. If you use C, another attempt is made at +logical name translation after the deletion, so an inner-mode +logical name or a name in another logical name table will +replace the logical name just deleted. It is not possible +at present to define a search list logical name via %ENV. + +In all operations on %ENV, the key string is treated as if it +were entirely uppercase, regardless of the case actually +specified in the Perl expression. + +=item $? + +Since VMS status values are 32 bits wide, the value of C<$?> +is simply the final status value of the last subprocess to +complete. This differs from the behavior of C<$?> under Unix, +and under VMS' POSIX environment, in that the low-order 8 bits +of C<$?> do not specify whether the process terminated normally +or due to a signal, and you do not need to shift C<$?> 8 bits +to the right in order to find the process' exit status. + +=item $! + +The string value of C<$!> is that returned by the CRTL's +strerror() function, so it will include the VMS message for +VMS-specific errors. The numeric value of C<$!> is the +value of C, except if errno is EVMSERR, in which +case C<$!> contains the value of vaxc$errno. Setting C<$!> +always sets errno to the value specified, and sets vaxc$errno +to 4 (NONAME-F-NOMSG). + =head1 Revision date This document was last updated on 16-Dec-1994, for Perl 5,