is identical to C<$Config{'osname'}>. See also L<Config> and the
B<-V> command-line switch documented in L<perlrun>.
+In Windows platforms, $^O is not very helpful: since it is always
+C<MSWin32>, it doesn't tell the difference between
+95/98/ME/NT/2000/XP/CE/.NET. Use Win32::GetOSName() or
+Win32::GetOSVersion() (see L<Win32> and L<perlport>) to distinguish
+between the variants.
+
=item ${^OPEN}
An internal variable used by PerlIO. A string in two parts, separated
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.
+is no guarantee that the value of $^X is in PATH. For VMS, the
+value may or may not include a version number.
You usually can use the value of $^X to re-invoke an independent
copy of the same perl that is currently running, e.g.,
# Build up a set of file names (not command names).
use Config;
- use File::Spec;
- $this_perl = File::Spec->canonpath($^X);
- $this_perl .= $Config{exe_ext}
- unless $this_perl =~ m/$Config{exe_ext}$/i;
+ $this_perl = $^X;
+ if ($^O ne 'VMS')
+ {$this_perl .= $Config{_exe}
+ unless $this_perl =~ m/$Config{_exe}$/i;}
Because many operating systems permit anyone with read access to
the Perl program file to make a copy of it, patch the copy, and
command or referenced as a file.
use Config;
- use File::Spec;
- $secure_perl_path = File::Spec->canonpath($Config{perlpath});
- $secure_perl_path .= $Config{exe_ext}
- unless $secure_perl_path =~ m/$Config{exe_ext}$/i;
+ $secure_perl_path = $Config{perlpath};
+ if ($^O ne 'VMS')
+ {$secure_perl_path .= $Config{_exe}
+ unless $secure_perl_path =~ m/$Config{_exe}$/i;}
=item ARGV