(included as of Perl 5.8). Keeping all data as text significantly
simplifies matters.
-The v-strings are portable only up to v2147483647 (0x7FFF_FFFF), that's
-how far EBCDIC, or more precisely UTF-EBCDIC will go.
-
=head2 Files and Filesystems
Most platforms these days structure files in a hierarchical fashion.
layers usually try to make interfaces like C<chmod()> work, but sometimes
there simply is no good mapping.
-If all this is intimidating, have no (well, maybe only a little)
-fear. There are modules that can help. The C<File::Spec> modules
-provide methods to do the Right Thing on whatever platform happens
-to be running the program.
+The C<File::Spec> modules provide methods to manipulate path
+specifications and return the results in native format for each
+platform. This is often unnecessary as Unix-style paths are
+understood by Perl on every supported platform, but if you need to
+produce native paths for a native utility that does not understand
+Unix syntax, or if you are operating on paths or path components
+in unknown (and thus possibly native) syntax, C<File::Spec> is
+your friend. Here are two brief examples:
use File::Spec::Functions;
chdir(updir()); # go up one directory
- my $file = catfile(curdir(), 'temp', 'file.txt');
- # on Unix and Win32, './temp/file.txt'
- # on Mac OS Classic, ':temp:file.txt'
- # on VMS, '[.temp]file.txt'
-C<File::Spec> is available in the standard distribution as of version
-5.004_05. C<File::Spec::Functions> is only in C<File::Spec> 0.7 and later,
-and some versions of Perl come with version 0.6. If C<File::Spec>
-is not updated to 0.7 or later, you must use the object-oriented
-interface from C<File::Spec> (or upgrade C<File::Spec>).
+ # Concatenate a path from its components
+ my $file = catfile(updir(), 'temp', 'file.txt');
+ # on Unix: '../temp/file.txt'
+ # on Win32: '..\temp\file.txt'
+ # on VMS: '[-.temp]file.txt'
In general, production code should not have file paths hardcoded.
Making them user-supplied or read from a configuration file is
Assume nothing about numerical values (C<ord>, C<chr>) of characters.
Do not use explicit code point ranges (like C<\xHH-\xHH)>. However,
starting in Perl v5.22, regular expression pattern bracketed character
-class ranges specified like C<qr/[\N{U+HH}-\N{U+HH}]/> are portable.
+class ranges specified like C<qr/[\N{U+HH}-\N{U+HH}]/> are portable,
+and starting in Perl v5.24, the same ranges are portable in C<tr///>.
You can portably use symbolic character classes like C<[:print:]>.
Do not assume that the alphabetic characters are encoded contiguously
C<qr/[0-9]/> behave as expected. C<tr///> behaves the same for these
ranges. In patterns, any ranges specified with end points using the
C<\N{...}> notations ensures character set portability, but it is a bug
-in Perl v5.22, that this isn't true of C<tr///>.
+in Perl v5.22, that this isn't true of C<tr///>, fixed in v5.24.
Do not assume anything about the ordering of the characters.
The lowercase letters may come before or after the uppercase letters;
=head2 EBCDIC Platforms
-Recent versions of Perl have been ported to platforms such as OS/400 on
-AS/400 minicomputers as well as OS/390, VM/ESA, and BS2000 for S/390
-Mainframes. Such computers use EBCDIC character sets internally (usually
+v5.22 core Perl runs on z/OS (formerly OS/390). Theoretically it could
+run on the successors of OS/400 on AS/400 minicomputers as well as
+VM/ESA, and BS2000 for S/390 Mainframes. Such computers use EBCDIC
+character sets internally (usually
Character Code Set ID 0037 for OS/400 and either 1047 or POSIX-BC for S/390
-systems). On the mainframe perl currently works under the "Unix system
+systems).
+
+The rest of this section may need updating, but we don't know what it
+should say. Please email comments to
+L<perlbug@perl.org|mailto:perlbug@perl.org>.
+
+On the mainframe Perl currently works under the "Unix system
services for OS/390" (formerly known as OpenEdition), VM/ESA OpenEdition, or
the BS200 POSIX-BC system (BS2000 is supported in Perl 5.6 and greater).
See L<perlos390> for details. Note that for OS/400 there is also a port of
=item *
-L<perlos390>, L<perlos400>, F<perlbs2000>, L<perlebcdic>.
+L<perlos390>, L<perlos400>, L<perlbs2000>, L<perlebcdic>.
=item *
processes in the same process group as the process specified by
$pid. (Win32)
-Is not supported for process identification number of 0 or negative
-numbers. (VMS)
+A pid of -1 indicating all processes on the system is not currently
+supported. (VMS)
=item link