Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man1 / perlport.1
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "PERLPORT 1"
132.TH PERLPORT 1 "2002-06-08" "perl v5.8.0" "Perl Programmers Reference Guide"
133.SH "NAME"
134perlport \- Writing portable Perl
135.SH "DESCRIPTION"
136.IX Header "DESCRIPTION"
137Perl runs on numerous operating systems. While most of them share
138much in common, they also have their own unique features.
139.PP
140This document is meant to help you to find out what constitutes portable
141Perl code. That way once you make a decision to write portably,
142you know where the lines are drawn, and you can stay within them.
143.PP
144There is a tradeoff between taking full advantage of one particular
145type of computer and taking advantage of a full range of them.
146Naturally, as you broaden your range and become more diverse, the
147common factors drop, and you are left with an increasingly smaller
148area of common ground in which you can operate to accomplish a
149particular task. Thus, when you begin attacking a problem, it is
150important to consider under which part of the tradeoff curve you
151want to operate. Specifically, you must decide whether it is
152important that the task that you are coding have the full generality
153of being portable, or whether to just get the job done right now.
154This is the hardest choice to be made. The rest is easy, because
155Perl provides many choices, whichever way you want to approach your
156problem.
157.PP
158Looking at it another way, writing portable code is usually about
159willfully limiting your available choices. Naturally, it takes
160discipline and sacrifice to do that. The product of portability
161and convenience may be a constant. You have been warned.
162.PP
163Be aware of two important points:
164.IP "Not all Perl programs have to be portable" 4
165.IX Item "Not all Perl programs have to be portable"
166There is no reason you should not use Perl as a language to glue Unix
167tools together, or to prototype a Macintosh application, or to manage the
168Windows registry. If it makes no sense to aim for portability for one
169reason or another in a given program, then don't bother.
170.IP "Nearly all of Perl already \fIis\fR portable" 4
171.IX Item "Nearly all of Perl already is portable"
172Don't be fooled into thinking that it is hard to create portable Perl
173code. It isn't. Perl tries its level-best to bridge the gaps between
174what's available on different platforms, and all the means available to
175use those features. Thus almost all Perl code runs on any machine
176without modification. But there are some significant issues in
177writing portable code, and this document is entirely about those issues.
178.PP
179Here's the general rule: When you approach a task commonly done
180using a whole range of platforms, think about writing portable
181code. That way, you don't sacrifice much by way of the implementation
182choices you can avail yourself of, and at the same time you can give
183your users lots of platform choices. On the other hand, when you have to
184take advantage of some unique feature of a particular platform, as is
185often the case with systems programming (whether for Unix, Windows,
186Mac\ \s-1OS\s0, \s-1VMS\s0, etc.), consider writing platform-specific code.
187.PP
188When the code will run on only two or three operating systems, you
189may need to consider only the differences of those particular systems.
190The important thing is to decide where the code will run and to be
191deliberate in your decision.
192.PP
193The material below is separated into three main sections: main issues of
194portability (\*(L"\s-1ISSUES\s0\*(R", platform-specific issues (\*(L"\s-1PLATFORMS\s0\*(R", and
195built-in perl functions that behave differently on various ports
196(\*(L"\s-1FUNCTION\s0 \s-1IMPLEMENTATIONS\s0\*(R".
197.PP
198This information should not be considered complete; it includes possibly
199transient information about idiosyncrasies of some of the ports, almost
200all of which are in a state of constant evolution. Thus, this material
201should be considered a perpetual work in progress
202(\f(CW\*(C`<IMG SRC="yellow_sign.gif" ALT="Under Construction">\*(C'\fR).
203.SH "ISSUES"
204.IX Header "ISSUES"
205.Sh "Newlines"
206.IX Subsection "Newlines"
207In most operating systems, lines in files are terminated by newlines.
208Just what is used as a newline may vary from \s-1OS\s0 to \s-1OS\s0. Unix
209traditionally uses \f(CW\*(C`\e012\*(C'\fR, one type of DOSish I/O uses \f(CW\*(C`\e015\e012\*(C'\fR,
210and Mac\ \s-1OS\s0 uses \f(CW\*(C`\e015\*(C'\fR.
211.PP
212Perl uses \f(CW\*(C`\en\*(C'\fR to represent the \*(L"logical\*(R" newline, where what is
213logical may depend on the platform in use. In MacPerl, \f(CW\*(C`\en\*(C'\fR always
214means \f(CW\*(C`\e015\*(C'\fR. In DOSish perls, \f(CW\*(C`\en\*(C'\fR usually means \f(CW\*(C`\e012\*(C'\fR, but
215when accessing a file in \*(L"text\*(R" mode, \s-1STDIO\s0 translates it to (or
216from) \f(CW\*(C`\e015\e012\*(C'\fR, depending on whether you're reading or writing.
217Unix does the same thing on ttys in canonical mode. \f(CW\*(C`\e015\e012\*(C'\fR
218is commonly referred to as \s-1CRLF\s0.
219.PP
220A common cause of unportable programs is the misuse of \fIchop()\fR to trim
221newlines:
222.PP
223.Vb 6
224\& # XXX UNPORTABLE!
225\& while(<FILE>) {
226\& chop;
227\& @array = split(/:/);
228\& #...
229\& }
230.Ve
231.PP
232You can get away with this on Unix and Mac \s-1OS\s0 (they have a single
233character end\-of\-line), but the same program will break under DOSish
234perls because you're only \fIchop()\fRing half the end\-of\-line. Instead,
235\&\fIchomp()\fR should be used to trim newlines. The Dunce::Files module can
236help audit your code for misuses of \fIchop()\fR.
237.PP
238When dealing with binary files (or text files in binary mode) be sure
239to explicitly set $/ to the appropriate value for your file format
240before using \fIchomp()\fR.
241.PP
242Because of the \*(L"text\*(R" mode translation, DOSish perls have limitations
243in using \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR on a file accessed in \*(L"text\*(R" mode.
244Stick to \f(CW\*(C`seek\*(C'\fR\-ing to locations you got from \f(CW\*(C`tell\*(C'\fR (and no
245others), and you are usually free to use \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR even
246in \*(L"text\*(R" mode. Using \f(CW\*(C`seek\*(C'\fR or \f(CW\*(C`tell\*(C'\fR or other file operations
247may be non\-portable. If you use \f(CW\*(C`binmode\*(C'\fR on a file, however, you
248can usually \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR with arbitrary values in safety.
249.PP
250A common misconception in socket programming is that \f(CW\*(C`\en\*(C'\fR eq \f(CW\*(C`\e012\*(C'\fR
251everywhere. When using protocols such as common Internet protocols,
252\&\f(CW\*(C`\e012\*(C'\fR and \f(CW\*(C`\e015\*(C'\fR are called for specifically, and the values of
253the logical \f(CW\*(C`\en\*(C'\fR and \f(CW\*(C`\er\*(C'\fR (carriage return) are not reliable.
254.PP
255.Vb 2
256\& print SOCKET "Hi there, client!\er\en"; # WRONG
257\& print SOCKET "Hi there, client!\e015\e012"; # RIGHT
258.Ve
259.PP
260However, using \f(CW\*(C`\e015\e012\*(C'\fR (or \f(CW\*(C`\ecM\ecJ\*(C'\fR, or \f(CW\*(C`\ex0D\ex0A\*(C'\fR) can be tedious
261and unsightly, as well as confusing to those maintaining the code. As
262such, the Socket module supplies the Right Thing for those who want it.
263.PP
264.Vb 2
265\& use Socket qw(:DEFAULT :crlf);
266\& print SOCKET "Hi there, client!$CRLF" # RIGHT
267.Ve
268.PP
269When reading from a socket, remember that the default input record
270separator \f(CW$/\fR is \f(CW\*(C`\en\*(C'\fR, but robust socket code will recognize as
271either \f(CW\*(C`\e012\*(C'\fR or \f(CW\*(C`\e015\e012\*(C'\fR as end of line:
272.PP
273.Vb 3
274\& while (<SOCKET>) {
275\& # ...
276\& }
277.Ve
278.PP
279Because both \s-1CRLF\s0 and \s-1LF\s0 end in \s-1LF\s0, the input record separator can
280be set to \s-1LF\s0 and any \s-1CR\s0 stripped later. Better to write:
281.PP
282.Vb 2
283\& use Socket qw(:DEFAULT :crlf);
284\& local($/) = LF; # not needed if $/ is already \e012
285.Ve
286.PP
287.Vb 4
288\& while (<SOCKET>) {
289\& s/$CR?$LF/\en/; # not sure if socket uses LF or CRLF, OK
290\& # s/\e015?\e012/\en/; # same thing
291\& }
292.Ve
293.PP
294This example is preferred over the previous one\*(--even for Unix
295platforms\*(--because now any \f(CW\*(C`\e015\*(C'\fR's (\f(CW\*(C`\ecM\*(C'\fR's) are stripped out
296(and there was much rejoicing).
297.PP
298Similarly, functions that return text data\*(--such as a function that
299fetches a web page\*(--should sometimes translate newlines before
300returning the data, if they've not yet been translated to the local
301newline representation. A single line of code will often suffice:
302.PP
303.Vb 2
304\& $data =~ s/\e015?\e012/\en/g;
305\& return $data;
306.Ve
307.PP
308Some of this may be confusing. Here's a handy reference to the \s-1ASCII\s0 \s-1CR\s0
309and \s-1LF\s0 characters. You can print it out and stick it in your wallet.
310.PP
311.Vb 2
312\& LF eq \e012 eq \ex0A eq \ecJ eq chr(10) eq ASCII 10
313\& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq ASCII 13
314.Ve
315.PP
316.Vb 8
317\& | Unix | DOS | Mac |
318\& ---------------------------
319\& \en | LF | LF | CR |
320\& \er | CR | CR | LF |
321\& \en * | LF | CRLF | CR |
322\& \er * | CR | CR | LF |
323\& ---------------------------
324\& * text-mode STDIO
325.Ve
326.PP
327The Unix column assumes that you are not accessing a serial line
328(like a tty) in canonical mode. If you are, then \s-1CR\s0 on input becomes
329\&\*(L"\en\*(R", and \*(L"\en\*(R" on output becomes \s-1CRLF\s0.
330.PP
331These are just the most common definitions of \f(CW\*(C`\en\*(C'\fR and \f(CW\*(C`\er\*(C'\fR in Perl.
332There may well be others. For example, on an \s-1EBCDIC\s0 implementation such
333as z/OS or \s-1OS/400\s0 the above material is similar to \*(L"Unix\*(R" but the code
334numbers change:
335.PP
336.Vb 4
337\& LF eq \e025 eq \ex15 eq chr(21) eq CP-1047 21
338\& LF eq \e045 eq \ex25 eq \ecU eq chr(37) eq CP-0037 37
339\& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq CP-1047 13
340\& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq CP-0037 13
341.Ve
342.PP
343.Vb 8
344\& | z/OS | OS/400 |
345\& ----------------------
346\& \en | LF | LF |
347\& \er | CR | CR |
348\& \en * | LF | LF |
349\& \er * | CR | CR |
350\& ----------------------
351\& * text-mode STDIO
352.Ve
353.Sh "Numbers endianness and Width"
354.IX Subsection "Numbers endianness and Width"
355Different CPUs store integers and floating point numbers in different
356orders (called \fIendianness\fR) and widths (32\-bit and 64\-bit being the
357most common today). This affects your programs when they attempt to transfer
358numbers in binary format from one \s-1CPU\s0 architecture to another,
359usually either \*(L"live\*(R" via network connection, or by storing the
360numbers to secondary storage such as a disk file or tape.
361.PP
362Conflicting storage orders make utter mess out of the numbers. If a
363little-endian host (Intel, \s-1VAX\s0) stores 0x12345678 (305419896 in
364decimal), a big-endian host (Motorola, Sparc, \s-1PA\s0) reads it as
3650x78563412 (2018915346 in decimal). Alpha and \s-1MIPS\s0 can be either:
366Digital/Compaq used/uses them in little-endian mode; SGI/Cray uses
367them in big-endian mode. To avoid this problem in network (socket)
368connections use the \f(CW\*(C`pack\*(C'\fR and \f(CW\*(C`unpack\*(C'\fR formats \f(CW\*(C`n\*(C'\fR and \f(CW\*(C`N\*(C'\fR, the
369\&\*(L"network\*(R" orders. These are guaranteed to be portable.
370.PP
371You can explore the endianness of your platform by unpacking a
372data structure packed in native format such as:
373.PP
374.Vb 3
375\& print unpack("h*", pack("s2", 1, 2)), "\en";
376\& # '10002000' on e.g. Intel x86 or Alpha 21064 in little-endian mode
377\& # '00100020' on e.g. Motorola 68040
378.Ve
379.PP
380If you need to distinguish between endian architectures you could use
381either of the variables set like so:
382.PP
383.Vb 2
384\& $is_big_endian = unpack("h*", pack("s", 1)) =~ /01/;
385\& $is_little_endian = unpack("h*", pack("s", 1)) =~ /^1/;
386.Ve
387.PP
388Differing widths can cause truncation even between platforms of equal
389endianness. The platform of shorter width loses the upper parts of the
390number. There is no good solution for this problem except to avoid
391transferring or storing raw binary numbers.
392.PP
393One can circumnavigate both these problems in two ways. Either
394transfer and store numbers always in text format, instead of raw
395binary, or else consider using modules like Data::Dumper (included in
396the standard distribution as of Perl 5.005) and Storable (included as
397of perl 5.8). Keeping all data as text significantly simplifies matters.
398.PP
399The v\-strings are portable only up to v2147483647 (0x7FFFFFFF), that's
400how far \s-1EBCDIC\s0, or more precisely UTF-EBCDIC will go.
401.Sh "Files and Filesystems"
402.IX Subsection "Files and Filesystems"
403Most platforms these days structure files in a hierarchical fashion.
404So, it is reasonably safe to assume that all platforms support the
405notion of a \*(L"path\*(R" to uniquely identify a file on the system. How
406that path is really written, though, differs considerably.
407.PP
408Although similar, file path specifications differ between Unix,
409Windows, Mac\ \s-1OS\s0, \s-1OS/2\s0, \s-1VMS\s0, \s-1VOS\s0, \s-1RISC\s0\ \s-1OS\s0, and probably others.
410Unix, for example, is one of the few OSes that has the elegant idea
411of a single root directory.
412.PP
413\&\s-1DOS\s0, \s-1OS/2\s0, \s-1VMS\s0, \s-1VOS\s0, and Windows can work similarly to Unix with \f(CW\*(C`/\*(C'\fR
414as path separator, or in their own idiosyncratic ways (such as having
415several root directories and various \*(L"unrooted\*(R" device files such \s-1NIL:\s0
416and \s-1LPT:\s0).
417.PP
418Mac\ \s-1OS\s0 uses \f(CW\*(C`:\*(C'\fR as a path separator instead of \f(CW\*(C`/\*(C'\fR.
419.PP
420The filesystem may support neither hard links (\f(CW\*(C`link\*(C'\fR) nor
421symbolic links (\f(CW\*(C`symlink\*(C'\fR, \f(CW\*(C`readlink\*(C'\fR, \f(CW\*(C`lstat\*(C'\fR).
422.PP
423The filesystem may support neither access timestamp nor change
424timestamp (meaning that about the only portable timestamp is the
425modification timestamp), or one second granularity of any timestamps
426(e.g. the \s-1FAT\s0 filesystem limits the time granularity to two seconds).
427.PP
428The \*(L"inode change timestamp\*(R" (the \f(CW\*(C`\-C\*(C'\fR filetest) may really be the
429\&\*(L"creation timestamp\*(R" (which it is not in \s-1UNIX\s0).
430.PP
431\&\s-1VOS\s0 perl can emulate Unix filenames with \f(CW\*(C`/\*(C'\fR as path separator. The
432native pathname characters greater\-than, less\-than, number\-sign, and
433percent-sign are always accepted.
434.PP
435\&\s-1RISC\s0\ \s-1OS\s0 perl can emulate Unix filenames with \f(CW\*(C`/\*(C'\fR as path
436separator, or go native and use \f(CW\*(C`.\*(C'\fR for path separator and \f(CW\*(C`:\*(C'\fR to
437signal filesystems and disk names.
438.PP
439Don't assume \s-1UNIX\s0 filesystem access semantics: that read, write,
440and execute are all the permissions there are, and even if they exist,
441that their semantics (for example what do r, w, and x mean on
442a directory) are the \s-1UNIX\s0 ones. The various \s-1UNIX/POSIX\s0 compatibility
443layers usually try to make interfaces like \fIchmod()\fR work, but sometimes
444there simply is no good mapping.
445.PP
446If all this is intimidating, have no (well, maybe only a little)
447fear. There are modules that can help. The File::Spec modules
448provide methods to do the Right Thing on whatever platform happens
449to be running the program.
450.PP
451.Vb 6
452\& use File::Spec::Functions;
453\& chdir(updir()); # go up one directory
454\& $file = catfile(curdir(), 'temp', 'file.txt');
455\& # on Unix and Win32, './temp/file.txt'
456\& # on Mac OS, ':temp:file.txt'
457\& # on VMS, '[.temp]file.txt'
458.Ve
459.PP
460File::Spec is available in the standard distribution as of version
4615.004_05. File::Spec::Functions is only in File::Spec 0.7 and later,
462and some versions of perl come with version 0.6. If File::Spec
463is not updated to 0.7 or later, you must use the object-oriented
464interface from File::Spec (or upgrade File::Spec).
465.PP
466In general, production code should not have file paths hardcoded.
467Making them user-supplied or read from a configuration file is
468better, keeping in mind that file path syntax varies on different
469machines.
470.PP
471This is especially noticeable in scripts like Makefiles and test suites,
472which often assume \f(CW\*(C`/\*(C'\fR as a path separator for subdirectories.
473.PP
474Also of use is File::Basename from the standard distribution, which
475splits a pathname into pieces (base filename, full path to directory,
476and file suffix).
477.PP
478Even when on a single platform (if you can call Unix a single platform),
479remember not to count on the existence or the contents of particular
480system-specific files or directories, like \fI/etc/passwd\fR,
481\&\fI/etc/sendmail.conf\fR, \fI/etc/resolv.conf\fR, or even \fI/tmp/\fR. For
482example, \fI/etc/passwd\fR may exist but not contain the encrypted
483passwords, because the system is using some form of enhanced security.
484Or it may not contain all the accounts, because the system is using \s-1NIS\s0.
485If code does need to rely on such a file, include a description of the
486file and its format in the code's documentation, then make it easy for
487the user to override the default location of the file.
488.PP
489Don't assume a text file will end with a newline. They should,
490but people forget.
491.PP
492Do not have two files or directories of the same name with different
493case, like \fItest.pl\fR and \fITest.pl\fR, as many platforms have
494case-insensitive (or at least case\-forgiving) filenames. Also, try
495not to have non-word characters (except for \f(CW\*(C`.\*(C'\fR) in the names, and
496keep them to the 8.3 convention, for maximum portability, onerous a
497burden though this may appear.
498.PP
499Likewise, when using the AutoSplit module, try to keep your functions to
5008.3 naming and case-insensitive conventions; or, at the least,
501make it so the resulting files have a unique (case\-insensitively)
502first 8 characters.
503.PP
504Whitespace in filenames is tolerated on most systems, but not all,
505and even on systems where it might be tolerated, some utilities
506might become confused by such whitespace.
507.PP
508Many systems (\s-1DOS\s0, \s-1VMS\s0) cannot have more than one \f(CW\*(C`.\*(C'\fR in their filenames.
509.PP
510Don't assume \f(CW\*(C`>\*(C'\fR won't be the first character of a filename.
511Always use \f(CW\*(C`<\*(C'\fR explicitly to open a file for reading, or even
512better, use the three-arg version of open, unless you want the user to
513be able to specify a pipe open.
514.PP
515.Vb 1
516\& open(FILE, '<', $existing_file) or die $!;
517.Ve
518.PP
519If filenames might use strange characters, it is safest to open it
520with \f(CW\*(C`sysopen\*(C'\fR instead of \f(CW\*(C`open\*(C'\fR. \f(CW\*(C`open\*(C'\fR is magic and can
521translate characters like \f(CW\*(C`>\*(C'\fR, \f(CW\*(C`<\*(C'\fR, and \f(CW\*(C`|\*(C'\fR, which may
522be the wrong thing to do. (Sometimes, though, it's the right thing.)
523Three-arg open can also help protect against this translation in cases
524where it is undesirable.
525.PP
526Don't use \f(CW\*(C`:\*(C'\fR as a part of a filename since many systems use that for
527their own semantics (Mac \s-1OS\s0 Classic for separating pathname components,
528many networking schemes and utilities for separating the nodename and
529the pathname, and so on). For the same reasons, avoid \f(CW\*(C`@\*(C'\fR, \f(CW\*(C`;\*(C'\fR and
530\&\f(CW\*(C`|\*(C'\fR.
531.PP
532Don't assume that in pathnames you can collapse two leading slashes
533\&\f(CW\*(C`//\*(C'\fR into one: some networking and clustering filesystems have special
534semantics for that. Let the operating system to sort it out.
535.PP
536The \fIportable filename characters\fR as defined by \s-1ANSI\s0 C are
537.PP
538.Vb 4
539\& a b c d e f g h i j k l m n o p q r t u v w x y z
540\& A B C D E F G H I J K L M N O P Q R T U V W X Y Z
541\& 0 1 2 3 4 5 6 7 8 9
542\& . _ -
543.Ve
544.PP
545and the \*(L"\-\*(R" shouldn't be the first character. If you want to be
546hypercorrect, stay case-insensitive and within the 8.3 naming
547convention (all the files and directories have to be unique within one
548directory if their names are lowercased and truncated to eight
549characters before the \f(CW\*(C`.\*(C'\fR, if any, and to three characters after the
550\&\f(CW\*(C`.\*(C'\fR, if any). (And do not use \f(CW\*(C`.\*(C'\fRs in directory names.)
551.Sh "System Interaction"
552.IX Subsection "System Interaction"
553Not all platforms provide a command line. These are usually platforms
554that rely primarily on a Graphical User Interface (\s-1GUI\s0) for user
555interaction. A program requiring a command line interface might
556not work everywhere. This is probably for the user of the program
557to deal with, so don't stay up late worrying about it.
558.PP
559Some platforms can't delete or rename files held open by the system.
560Remember to \f(CW\*(C`close\*(C'\fR files when you are done with them. Don't
561\&\f(CW\*(C`unlink\*(C'\fR or \f(CW\*(C`rename\*(C'\fR an open file. Don't \f(CW\*(C`tie\*(C'\fR or \f(CW\*(C`open\*(C'\fR a
562file already tied or opened; \f(CW\*(C`untie\*(C'\fR or \f(CW\*(C`close\*(C'\fR it first.
563.PP
564Don't open the same file more than once at a time for writing, as some
565operating systems put mandatory locks on such files.
566.PP
567Don't assume that write/modify permission on a directory gives the
568right to add or delete files/directories in that directory. That is
569filesystem specific: in some filesystems you need write/modify
570permission also (or even just) in the file/directory itself. In some
571filesystems (\s-1AFS\s0, \s-1DFS\s0) the permission to add/delete directory entries
572is a completely separate permission.
573.PP
574Don't assume that a single \f(CW\*(C`unlink\*(C'\fR completely gets rid of the file:
575some filesystems (most notably the ones in \s-1VMS\s0) have versioned
576filesystems, and \fIunlink()\fR removes only the most recent one (it doesn't
577remove all the versions because by default the native tools on those
578platforms remove just the most recent version, too). The portable
579idiom to remove all the versions of a file is
580.PP
581.Vb 1
582\& 1 while unlink "file";
583.Ve
584.PP
585This will terminate if the file is undeleteable for some reason
586(protected, not there, and so on).
587.PP
588Don't count on a specific environment variable existing in \f(CW%ENV\fR.
589Don't count on \f(CW%ENV\fR entries being case\-sensitive, or even
590case\-preserving. Don't try to clear \f(CW%ENV\fR by saying \f(CW\*(C`%ENV = ();\*(C'\fR, or,
591if you really have to, make it conditional on \f(CW\*(C`$^O ne 'VMS'\*(C'\fR since in
592\&\s-1VMS\s0 the \f(CW%ENV\fR table is much more than a per-process key-value string
593table.
594.PP
595Don't count on signals or \f(CW%SIG\fR for anything.
596.PP
597Don't count on filename globbing. Use \f(CW\*(C`opendir\*(C'\fR, \f(CW\*(C`readdir\*(C'\fR, and
598\&\f(CW\*(C`closedir\*(C'\fR instead.
599.PP
600Don't count on per-program environment variables, or per-program current
601directories.
602.PP
603Don't count on specific values of \f(CW$!\fR.
604.Sh "Command names versus file pathnames"
605.IX Subsection "Command names versus file pathnames"
606Don't assume that the name used to invoke a command or program with
607\&\f(CW\*(C`system\*(C'\fR or \f(CW\*(C`exec\*(C'\fR can also be used to test for the existence of the
608file that holds the executable code for that command or program.
609First, many systems have \*(L"internal\*(R" commands that are built-in to the
610shell or \s-1OS\s0 and while these commands can be invoked, there is no
611corresponding file. Second, some operating systems (e.g., Cygwin,
612\&\s-1DJGPP\s0, \s-1OS/2\s0, and \s-1VOS\s0) have required suffixes for executable files;
613these suffixes are generally permitted on the command name but are not
614required. Thus, a command like \*(L"perl\*(R" might exist in a file named
615\&\*(L"perl\*(R", \*(L"perl.exe\*(R", or \*(L"perl.pm\*(R", depending on the operating system.
616The variable \*(L"_exe\*(R" in the Config module holds the executable suffix,
617if any. Third, the \s-1VMS\s0 port carefully sets up $^X and
618\&\f(CW$Config\fR{perlpath} so that no further processing is required. This is
619just as well, because the matching regular expression used below would
620then have to deal with a possible trailing version number in the \s-1VMS\s0
621file name.
622.PP
623To convert $^X to a file pathname, taking account of the requirements
624of the various operating system possibilities, say:
625 use Config;
626 \f(CW$thisperl\fR = $^X;
627 if ($^O ne '\s-1VMS\s0')
628 {$thisperl .= \f(CW$Config\fR{_exe} unless \f(CW$thisperl\fR =~ m/$Config{_exe}$/i;}
629.PP
630To convert \f(CW$Config\fR{perlpath} to a file pathname, say:
631 use Config;
632 \f(CW$thisperl\fR = \f(CW$Config\fR{perlpath};
633 if ($^O ne '\s-1VMS\s0')
634 {$thisperl .= \f(CW$Config\fR{_exe} unless \f(CW$thisperl\fR =~ m/$Config{_exe}$/i;}
635.Sh "Interprocess Communication (\s-1IPC\s0)"
636.IX Subsection "Interprocess Communication (IPC)"
637In general, don't directly access the system in code meant to be
638portable. That means, no \f(CW\*(C`system\*(C'\fR, \f(CW\*(C`exec\*(C'\fR, \f(CW\*(C`fork\*(C'\fR, \f(CW\*(C`pipe\*(C'\fR,
639\&\f(CW``\fR, \f(CW\*(C`qx//\*(C'\fR, \f(CW\*(C`open\*(C'\fR with a \f(CW\*(C`|\*(C'\fR, nor any of the other things
640that makes being a perl hacker worth being.
641.PP
642Commands that launch external processes are generally supported on
643most platforms (though many of them do not support any type of
644forking). The problem with using them arises from what you invoke
645them on. External tools are often named differently on different
646platforms, may not be available in the same location, might accept
647different arguments, can behave differently, and often present their
648results in a platform-dependent way. Thus, you should seldom depend
649on them to produce consistent results. (Then again, if you're calling
650\&\fInetstat \-a\fR, you probably don't expect it to run on both Unix and \s-1CP/M\s0.)
651.PP
652One especially common bit of Perl code is opening a pipe to \fBsendmail\fR:
653.PP
654.Vb 2
655\& open(MAIL, '|/usr/lib/sendmail -t')
656\& or die "cannot fork sendmail: $!";
657.Ve
658.PP
659This is fine for systems programming when sendmail is known to be
660available. But it is not fine for many non-Unix systems, and even
661some Unix systems that may not have sendmail installed. If a portable
662solution is needed, see the various distributions on \s-1CPAN\s0 that deal
663with it. Mail::Mailer and Mail::Send in the MailTools distribution are
664commonly used, and provide several mailing methods, including mail,
665sendmail, and direct \s-1SMTP\s0 (via Net::SMTP) if a mail transfer agent is
666not available. Mail::Sendmail is a standalone module that provides
667simple, platform-independent mailing.
668.PP
669The Unix System V \s-1IPC\s0 (\f(CW\*(C`msg*(), sem*(), shm*()\*(C'\fR) is not available
670even on all Unix platforms.
671.PP
672Do not use either the bare result of \f(CW\*(C`pack("N", 10, 20, 30, 40)\*(C'\fR or
673bare v\-strings (such as \f(CW\*(C`v10.20.30.40\*(C'\fR) to represent IPv4 addresses:
674both forms just pack the four bytes into network order. That this
675would be equal to the C language \f(CW\*(C`in_addr\*(C'\fR struct (which is what the
676socket code internally uses) is not guaranteed. To be portable use
677the routines of the Socket extension, such as \f(CW\*(C`inet_aton()\*(C'\fR,
678\&\f(CW\*(C`inet_ntoa()\*(C'\fR, and \f(CW\*(C`sockaddr_in()\*(C'\fR.
679.PP
680The rule of thumb for portable code is: Do it all in portable Perl, or
681use a module (that may internally implement it with platform-specific
682code, but expose a common interface).
683.Sh "External Subroutines (\s-1XS\s0)"
684.IX Subsection "External Subroutines (XS)"
685\&\s-1XS\s0 code can usually be made to work with any platform, but dependent
686libraries, header files, etc., might not be readily available or
687portable, or the \s-1XS\s0 code itself might be platform\-specific, just as Perl
688code might be. If the libraries and headers are portable, then it is
689normally reasonable to make sure the \s-1XS\s0 code is portable, too.
690.PP
691A different type of portability issue arises when writing \s-1XS\s0 code:
692availability of a C compiler on the end\-user's system. C brings
693with it its own portability issues, and writing \s-1XS\s0 code will expose
694you to some of those. Writing purely in Perl is an easier way to
695achieve portability.
696.Sh "Standard Modules"
697.IX Subsection "Standard Modules"
698In general, the standard modules work across platforms. Notable
699exceptions are the \s-1CPAN\s0 module (which currently makes connections to external
700programs that may not be available), platform-specific modules (like
701ExtUtils::MM_VMS), and \s-1DBM\s0 modules.
702.PP
703There is no one \s-1DBM\s0 module available on all platforms.
704SDBM_File and the others are generally available on all Unix and DOSish
705ports, but not in MacPerl, where only NBDM_File and DB_File are
706available.
707.PP
708The good news is that at least some \s-1DBM\s0 module should be available, and
709AnyDBM_File will use whichever module it can find. Of course, then
710the code needs to be fairly strict, dropping to the greatest common
711factor (e.g., not exceeding 1K for each record), so that it will
712work with any \s-1DBM\s0 module. See AnyDBM_File for more details.
713.Sh "Time and Date"
714.IX Subsection "Time and Date"
715The system's notion of time of day and calendar date is controlled in
716widely different ways. Don't assume the timezone is stored in \f(CW$ENV{TZ}\fR,
717and even if it is, don't assume that you can control the timezone through
718that variable.
719.PP
720Don't assume that the epoch starts at 00:00:00, January 1, 1970,
721because that is \s-1OS\-\s0 and implementation\-specific. It is better to store a date
722in an unambiguous representation. The \s-1ISO\-8601\s0 standard defines
723\&\*(L"\s-1YYYY\-MM\-DD\s0\*(R" as the date format. A text representation (like \*(L"1987\-12\-18\*(R")
724can be easily converted into an OS-specific value using a module like
725Date::Parse. An array of values, such as those returned by
726\&\f(CW\*(C`localtime\*(C'\fR, can be converted to an OS-specific representation using
727Time::Local.
728.PP
729When calculating specific times, such as for tests in time or date modules,
730it may be appropriate to calculate an offset for the epoch.
731.PP
732.Vb 2
733\& require Time::Local;
734\& $offset = Time::Local::timegm(0, 0, 0, 1, 0, 70);
735.Ve
736.PP
737The value for \f(CW$offset\fR in Unix will be \f(CW0\fR, but in Mac \s-1OS\s0 will be
738some large number. \f(CW$offset\fR can then be added to a Unix time value
739to get what should be the proper value on any system.
740.Sh "Character sets and character encoding"
741.IX Subsection "Character sets and character encoding"
742Assume very little about character sets.
743.PP
744Assume nothing about numerical values (\f(CW\*(C`ord\*(C'\fR, \f(CW\*(C`chr\*(C'\fR) of characters.
745Do not use explicit code point ranges (like \exHH\-\exHH); use for
746example symbolic character classes like \f(CW\*(C`[:print:]\*(C'\fR.
747.PP
748Do not assume that the alphabetic characters are encoded contiguously
749(in the numeric sense). There may be gaps.
750.PP
751Do not assume anything about the ordering of the characters.
752The lowercase letters may come before or after the uppercase letters;
753the lowercase and uppercase may be interlaced so that both `a' and `A'
754come before `b'; the accented and other international characters may
755be interlaced so that a\*: comes before `b'.
756.Sh "Internationalisation"
757.IX Subsection "Internationalisation"
758If you may assume \s-1POSIX\s0 (a rather large assumption), you may read
759more about the \s-1POSIX\s0 locale system from perllocale. The locale
760system at least attempts to make things a little bit more portable,
761or at least more convenient and native-friendly for non-English
762users. The system affects character sets and encoding, and date
763and time formatting\*(--amongst other things.
764.Sh "System Resources"
765.IX Subsection "System Resources"
766If your code is destined for systems with severely constrained (or
767missing!) virtual memory systems then you want to be \fIespecially\fR mindful
768of avoiding wasteful constructs such as:
769.PP
770.Vb 3
771\& # NOTE: this is no longer "bad" in perl5.005
772\& for (0..10000000) {} # bad
773\& for (my $x = 0; $x <= 10000000; ++$x) {} # good
774.Ve
775.PP
776.Vb 1
777\& @lines = <VERY_LARGE_FILE>; # bad
778.Ve
779.PP
780.Vb 2
781\& while (<FILE>) {$file .= $_} # sometimes bad
782\& $file = join('', <FILE>); # better
783.Ve
784.PP
785The last two constructs may appear unintuitive to most people. The
786first repeatedly grows a string, whereas the second allocates a
787large chunk of memory in one go. On some systems, the second is
788more efficient that the first.
789.Sh "Security"
790.IX Subsection "Security"
791Most multi-user platforms provide basic levels of security, usually
792implemented at the filesystem level. Some, however, do
793not\*(-- unfortunately. Thus the notion of user id, or \*(L"home\*(R" directory,
794or even the state of being logged\-in, may be unrecognizable on many
795platforms. If you write programs that are security\-conscious, it
796is usually best to know what type of system you will be running
797under so that you can write code explicitly for that platform (or
798class of platforms).
799.PP
800Don't assume the \s-1UNIX\s0 filesystem access semantics: the operating
801system or the filesystem may be using some \s-1ACL\s0 systems, which are
802richer languages than the usual rwx. Even if the rwx exist,
803their semantics might be different.
804.PP
805(From security viewpoint testing for permissions before attempting to
806do something is silly anyway: if one tries this, there is potential
807for race conditions\*(-- someone or something might change the
808permissions between the permissions check and the actual operation.
809Just try the operation.)
810.PP
811Don't assume the \s-1UNIX\s0 user and group semantics: especially, don't
812expect the \f(CW$<\fR and \f(CW$>\fR (or the \f(CW$(\fR and \f(CW$)\fR) to work
813for switching identities (or memberships).
814.PP
815Don't assume set-uid and set-gid semantics. (And even if you do,
816think twice: set-uid and set-gid are a known can of security worms.)
817.Sh "Style"
818.IX Subsection "Style"
819For those times when it is necessary to have platform-specific code,
820consider keeping the platform-specific code in one place, making porting
821to other platforms easier. Use the Config module and the special
822variable \f(CW$^O\fR to differentiate platforms, as described in
823\&\*(L"\s-1PLATFORMS\s0\*(R".
824.PP
825Be careful in the tests you supply with your module or programs.
826Module code may be fully portable, but its tests might not be. This
827often happens when tests spawn off other processes or call external
828programs to aid in the testing, or when (as noted above) the tests
829assume certain things about the filesystem and paths. Be careful
830not to depend on a specific output style for errors, such as when
831checking \f(CW$!\fR after a system call. Some platforms expect a certain
832output format, and perl on those platforms may have been adjusted
833accordingly. Most specifically, don't anchor a regex when testing
834an error value.
835.SH "CPAN Testers"
836.IX Header "CPAN Testers"
837Modules uploaded to \s-1CPAN\s0 are tested by a variety of volunteers on
838different platforms. These \s-1CPAN\s0 testers are notified by mail of each
839new upload, and reply to the list with \s-1PASS\s0, \s-1FAIL\s0, \s-1NA\s0 (not applicable to
840this platform), or \s-1UNKNOWN\s0 (unknown), along with any relevant notations.
841.PP
842The purpose of the testing is twofold: one, to help developers fix any
843problems in their code that crop up because of lack of testing on other
844platforms; two, to provide users with information about whether
845a given module works on a given platform.
846.IP "Mailing list: cpan\-testers@perl.org" 4
847.IX Item "Mailing list: cpan-testers@perl.org"
848.PD 0
849.IP "Testing results: http://testers.cpan.org/" 4
850.IX Item "Testing results: http://testers.cpan.org/"
851.PD
852.SH "PLATFORMS"
853.IX Header "PLATFORMS"
854As of version 5.002, Perl is built with a \f(CW$^O\fR variable that
855indicates the operating system it was built on. This was implemented
856to help speed up code that would otherwise have to \f(CW\*(C`use Config\*(C'\fR
857and use the value of \f(CW$Config{osname}\fR. Of course, to get more
858detailed information about the system, looking into \f(CW%Config\fR is
859certainly recommended.
860.PP
861\&\f(CW%Config\fR cannot always be trusted, however, because it was built
862at compile time. If perl was built in one place, then transferred
863elsewhere, some values may be wrong. The values may even have been
864edited after the fact.
865.Sh "Unix"
866.IX Subsection "Unix"
867Perl works on a bewildering variety of Unix and Unix-like platforms (see
868e.g. most of the files in the \fIhints/\fR directory in the source code kit).
869On most of these systems, the value of \f(CW$^O\fR (hence \f(CW$Config{'osname'}\fR,
870too) is determined either by lowercasing and stripping punctuation from the
871first field of the string returned by typing \f(CW\*(C`uname \-a\*(C'\fR (or a similar command)
872at the shell prompt or by testing the file system for the presence of
873uniquely named files such as a kernel or header file. Here, for example,
874are a few of the more popular Unix flavors:
875.PP
876.Vb 29
877\& uname $^O $Config{'archname'}
878\& --------------------------------------------
879\& AIX aix aix
880\& BSD/OS bsdos i386-bsdos
881\& Darwin darwin darwin
882\& dgux dgux AViiON-dgux
883\& DYNIX/ptx dynixptx i386-dynixptx
884\& FreeBSD freebsd freebsd-i386
885\& Linux linux arm-linux
886\& Linux linux i386-linux
887\& Linux linux i586-linux
888\& Linux linux ppc-linux
889\& HP-UX hpux PA-RISC1.1
890\& IRIX irix irix
891\& Mac OS X darwin darwin
892\& MachTen PPC machten powerpc-machten
893\& NeXT 3 next next-fat
894\& NeXT 4 next OPENSTEP-Mach
895\& openbsd openbsd i386-openbsd
896\& OSF1 dec_osf alpha-dec_osf
897\& reliantunix-n svr4 RM400-svr4
898\& SCO_SV sco_sv i386-sco_sv
899\& SINIX-N svr4 RM400-svr4
900\& sn4609 unicos CRAY_C90-unicos
901\& sn6521 unicosmk t3e-unicosmk
902\& sn9617 unicos CRAY_J90-unicos
903\& SunOS solaris sun4-solaris
904\& SunOS solaris i86pc-solaris
905\& SunOS4 sunos sun4-sunos
906.Ve
907.PP
908Because the value of \f(CW$Config{archname}\fR may depend on the
909hardware architecture, it can vary more than the value of \f(CW$^O\fR.
910.Sh "\s-1DOS\s0 and Derivatives"
911.IX Subsection "DOS and Derivatives"
912Perl has long been ported to Intel-style microcomputers running under
913systems like \s-1PC\-DOS\s0, \s-1MS\-DOS\s0, \s-1OS/2\s0, and most Windows platforms you can
914bring yourself to mention (except for Windows \s-1CE\s0, if you count that).
915Users familiar with \fI\s-1COMMAND\s0.COM\fR or \fI\s-1CMD\s0.EXE\fR style shells should
916be aware that each of these file specifications may have subtle
917differences:
918.PP
919.Vb 4
920\& $filespec0 = "c:/foo/bar/file.txt";
921\& $filespec1 = "c:\e\efoo\e\ebar\e\efile.txt";
922\& $filespec2 = 'c:\efoo\ebar\efile.txt';
923\& $filespec3 = 'c:\e\efoo\e\ebar\e\efile.txt';
924.Ve
925.PP
926System calls accept either \f(CW\*(C`/\*(C'\fR or \f(CW\*(C`\e\*(C'\fR as the path separator.
927However, many command-line utilities of \s-1DOS\s0 vintage treat \f(CW\*(C`/\*(C'\fR as
928the option prefix, so may get confused by filenames containing \f(CW\*(C`/\*(C'\fR.
929Aside from calling any external programs, \f(CW\*(C`/\*(C'\fR will work just fine,
930and probably better, as it is more consistent with popular usage,
931and avoids the problem of remembering what to backwhack and what
932not to.
933.PP
934The \s-1DOS\s0 \s-1FAT\s0 filesystem can accommodate only \*(L"8.3\*(R" style filenames. Under
935the \*(L"case\-insensitive, but case\-preserving\*(R" \s-1HPFS\s0 (\s-1OS/2\s0) and \s-1NTFS\s0 (\s-1NT\s0)
936filesystems you may have to be careful about case returned with functions
937like \f(CW\*(C`readdir\*(C'\fR or used with functions like \f(CW\*(C`open\*(C'\fR or \f(CW\*(C`opendir\*(C'\fR.
938.PP
939\&\s-1DOS\s0 also treats several filenames as special, such as \s-1AUX\s0, \s-1PRN\s0,
940\&\s-1NUL\s0, \s-1CON\s0, \s-1COM1\s0, \s-1LPT1\s0, \s-1LPT2\s0, etc. Unfortunately, sometimes these
941filenames won't even work if you include an explicit directory
942prefix. It is best to avoid such filenames, if you want your code
943to be portable to \s-1DOS\s0 and its derivatives. It's hard to know what
944these all are, unfortunately.
945.PP
946Users of these operating systems may also wish to make use of
947scripts such as \fIpl2bat.bat\fR or \fIpl2cmd\fR to
948put wrappers around your scripts.
949.PP
950Newline (\f(CW\*(C`\en\*(C'\fR) is translated as \f(CW\*(C`\e015\e012\*(C'\fR by \s-1STDIO\s0 when reading from
951and writing to files (see \*(L"Newlines\*(R"). \f(CW\*(C`binmode(FILEHANDLE)\*(C'\fR
952will keep \f(CW\*(C`\en\*(C'\fR translated as \f(CW\*(C`\e012\*(C'\fR for that filehandle. Since it is a
953no-op on other systems, \f(CW\*(C`binmode\*(C'\fR should be used for cross-platform code
954that deals with binary data. That's assuming you realize in advance
955that your data is in binary. General-purpose programs should
956often assume nothing about their data.
957.PP
958The \f(CW$^O\fR variable and the \f(CW$Config{archname}\fR values for various
959DOSish perls are as follows:
960.PP
961.Vb 16
962\& OS $^O $Config{archname} ID Version
963\& --------------------------------------------------------
964\& MS-DOS dos ?
965\& PC-DOS dos ?
966\& OS/2 os2 ?
967\& Windows 3.1 ? ? 0 3 01
968\& Windows 95 MSWin32 MSWin32-x86 1 4 00
969\& Windows 98 MSWin32 MSWin32-x86 1 4 10
970\& Windows ME MSWin32 MSWin32-x86 1 ?
971\& Windows NT MSWin32 MSWin32-x86 2 4 xx
972\& Windows NT MSWin32 MSWin32-ALPHA 2 4 xx
973\& Windows NT MSWin32 MSWin32-ppc 2 4 xx
974\& Windows 2000 MSWin32 MSWin32-x86 2 5 xx
975\& Windows XP MSWin32 MSWin32-x86 2 ?
976\& Windows CE MSWin32 ? 3
977\& Cygwin cygwin ?
978.Ve
979.PP
980The various MSWin32 Perl's can distinguish the \s-1OS\s0 they are running on
981via the value of the fifth element of the list returned from
982\&\fIWin32::GetOSVersion()\fR. For example:
983.PP
984.Vb 4
985\& if ($^O eq 'MSWin32') {
986\& my @os_version_info = Win32::GetOSVersion();
987\& print +('3.1','95','NT')[$os_version_info[4]],"\en";
988\& }
989.Ve
990.PP
991There are also \fIWin32::IsWinNT()\fR and \fIWin32::IsWin95()\fR, try \f(CW\*(C`perldoc Win32\*(C'\fR,
992and as of libwin32 0.19 (not part of the core Perl distribution)
993\&\fIWin32::GetOSName()\fR. The very portable \fIPOSIX::uname()\fR will work too:
994.PP
995.Vb 2
996\& c:\e> perl -MPOSIX -we "print join '|', uname"
997\& Windows NT|moonru|5.0|Build 2195 (Service Pack 2)|x86
998.Ve
999.PP
1000Also see:
1001.IP "\(bu" 4
1002The djgpp environment for \s-1DOS\s0, http://www.delorie.com/djgpp/
1003and perldos.
1004.IP "\(bu" 4
1005The \s-1EMX\s0 environment for \s-1DOS\s0, \s-1OS/2\s0, etc. emx@iaehv.nl,
1006http://www.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/index.html or
1007ftp://hobbes.nmsu.edu/pub/os2/dev/emx/ Also perlos2.
1008.IP "\(bu" 4
1009Build instructions for Win32 in perlwin32, or under the Cygnus environment
1010in perlcygwin.
1011.IP "\(bu" 4
1012The \f(CW\*(C`Win32::*\*(C'\fR modules in Win32.
1013.IP "\(bu" 4
1014The ActiveState Pages, http://www.activestate.com/
1015.IP "\(bu" 4
1016The Cygwin environment for Win32; \fI\s-1README\s0.cygwin\fR (installed
1017as perlcygwin), http://www.cygwin.com/
1018.IP "\(bu" 4
1019The U/WIN environment for Win32,
1020http://www.research.att.com/sw/tools/uwin/
1021.IP "\(bu" 4
1022Build instructions for \s-1OS/2\s0, perlos2
1023.Sh "Mac\ \s-1OS\s0"
1024.IX Subsection "MacOS"
1025Any module requiring \s-1XS\s0 compilation is right out for most people, because
1026MacPerl is built using non-free (and non\-cheap!) compilers. Some \s-1XS\s0
1027modules that can work with MacPerl are built and distributed in binary
1028form on \s-1CPAN\s0.
1029.PP
1030Directories are specified as:
1031.PP
1032.Vb 6
1033\& volume:folder:file for absolute pathnames
1034\& volume:folder: for absolute pathnames
1035\& :folder:file for relative pathnames
1036\& :folder: for relative pathnames
1037\& :file for relative pathnames
1038\& file for relative pathnames
1039.Ve
1040.PP
1041Files are stored in the directory in alphabetical order. Filenames are
1042limited to 31 characters, and may include any character except for
1043null and \f(CW\*(C`:\*(C'\fR, which is reserved as the path separator.
1044.PP
1045Instead of \f(CW\*(C`flock\*(C'\fR, see \f(CW\*(C`FSpSetFLock\*(C'\fR and \f(CW\*(C`FSpRstFLock\*(C'\fR in the
1046Mac::Files module, or \f(CW\*(C`chmod(0444, ...)\*(C'\fR and \f(CW\*(C`chmod(0666, ...)\*(C'\fR.
1047.PP
1048In the MacPerl application, you can't run a program from the command line;
1049programs that expect \f(CW@ARGV\fR to be populated can be edited with something
1050like the following, which brings up a dialog box asking for the command
1051line arguments.
1052.PP
1053.Vb 3
1054\& if (!@ARGV) {
1055\& @ARGV = split /\es+/, MacPerl::Ask('Arguments?');
1056\& }
1057.Ve
1058.PP
1059A MacPerl script saved as a \*(L"droplet\*(R" will populate \f(CW@ARGV\fR with the full
1060pathnames of the files dropped onto the script.
1061.PP
1062Mac users can run programs under a type of command line interface
1063under \s-1MPW\s0 (Macintosh Programmer's Workshop, a free development
1064environment from Apple). MacPerl was first introduced as an \s-1MPW\s0
1065tool, and \s-1MPW\s0 can be used like a shell:
1066.PP
1067.Vb 1
1068\& perl myscript.plx some arguments
1069.Ve
1070.PP
1071ToolServer is another app from Apple that provides access to \s-1MPW\s0 tools
1072from \s-1MPW\s0 and the MacPerl app, which allows MacPerl programs to use
1073\&\f(CW\*(C`system\*(C'\fR, backticks, and piped \f(CW\*(C`open\*(C'\fR.
1074.PP
1075"Mac\ \s-1OS\s0" is the proper name for the operating system, but the value
1076in \f(CW$^O\fR is \*(L"MacOS\*(R". To determine architecture, version, or whether
1077the application or \s-1MPW\s0 tool version is running, check:
1078.PP
1079.Vb 5
1080\& $is_app = $MacPerl::Version =~ /App/;
1081\& $is_tool = $MacPerl::Version =~ /MPW/;
1082\& ($version) = $MacPerl::Version =~ /^(\eS+)/;
1083\& $is_ppc = $MacPerl::Architecture eq 'MacPPC';
1084\& $is_68k = $MacPerl::Architecture eq 'Mac68K';
1085.Ve
1086.PP
1087Mac\ \s-1OS\s0\ X, based on NeXT's OpenStep \s-1OS\s0, runs MacPerl natively, under the
1088\&\*(L"Classic\*(R" environment. There is no \*(L"Carbon\*(R" version of MacPerl to run
1089under the primary Mac \s-1OS\s0 X environment. Mac\ \s-1OS\s0\ X and its Open Source
1090version, Darwin, both run Unix perl natively.
1091.PP
1092Also see:
1093.IP "\(bu" 4
1094MacPerl Development, http://dev.macperl.org/ .
1095.IP "\(bu" 4
1096The MacPerl Pages, http://www.macperl.com/ .
1097.IP "\(bu" 4
1098The MacPerl mailing lists, http://lists.perl.org/ .
1099.Sh "\s-1VMS\s0"
1100.IX Subsection "VMS"
1101Perl on \s-1VMS\s0 is discussed in perlvms in the perl distribution.
1102Perl on \s-1VMS\s0 can accept either \s-1VMS\-\s0 or Unix-style file
1103specifications as in either of the following:
1104.PP
1105.Vb 2
1106\& $ perl -ne "print if /perl_setup/i" SYS$LOGIN:LOGIN.COM
1107\& $ perl -ne "print if /perl_setup/i" /sys$login/login.com
1108.Ve
1109.PP
1110but not a mixture of both as in:
1111.PP
1112.Vb 2
1113\& $ perl -ne "print if /perl_setup/i" sys$login:/login.com
1114\& Can't open sys$login:/login.com: file specification syntax error
1115.Ve
1116.PP
1117Interacting with Perl from the Digital Command Language (\s-1DCL\s0) shell
1118often requires a different set of quotation marks than Unix shells do.
1119For example:
1120.PP
1121.Vb 2
1122\& $ perl -e "print ""Hello, world.\en"""
1123\& Hello, world.
1124.Ve
1125.PP
1126There are several ways to wrap your perl scripts in \s-1DCL\s0 \fI.COM\fR files, if
1127you are so inclined. For example:
1128.PP
1129.Vb 6
1130\& $ write sys$output "Hello from DCL!"
1131\& $ if p1 .eqs. ""
1132\& $ then perl -x 'f$environment("PROCEDURE")
1133\& $ else perl -x - 'p1 'p2 'p3 'p4 'p5 'p6 'p7 'p8
1134\& $ deck/dollars="__END__"
1135\& #!/usr/bin/perl
1136.Ve
1137.PP
1138.Vb 1
1139\& print "Hello from Perl!\en";
1140.Ve
1141.PP
1142.Vb 2
1143\& __END__
1144\& $ endif
1145.Ve
1146.PP
1147Do take care with \f(CW\*(C`$ ASSIGN/nolog/user SYS$COMMAND: SYS$INPUT\*(C'\fR if your
1148perl-in-DCL script expects to do things like \f(CW\*(C`$read = <STDIN>;\*(C'\fR.
1149.PP
1150Filenames are in the format \*(L"name.extension;version\*(R". The maximum
1151length for filenames is 39 characters, and the maximum length for
1152extensions is also 39 characters. Version is a number from 1 to
115332767. Valid characters are \f(CW\*(C`/[A\-Z0\-9$_\-]/\*(C'\fR.
1154.PP
1155\&\s-1VMS\s0's \s-1RMS\s0 filesystem is case-insensitive and does not preserve case.
1156\&\f(CW\*(C`readdir\*(C'\fR returns lowercased filenames, but specifying a file for
1157opening remains case\-insensitive. Files without extensions have a
1158trailing period on them, so doing a \f(CW\*(C`readdir\*(C'\fR with a file named \fIA.;5\fR
1159will return \fIa.\fR (though that file could be opened with
1160\&\f(CW\*(C`open(FH, 'A')\*(C'\fR).
1161.PP
1162\&\s-1RMS\s0 had an eight level limit on directory depths from any rooted logical
1163(allowing 16 levels overall) prior to \s-1VMS\s0 7.2. Hence
1164\&\f(CW\*(C`PERL_ROOT:[LIB.2.3.4.5.6.7.8]\*(C'\fR is a valid directory specification but
1165\&\f(CW\*(C`PERL_ROOT:[LIB.2.3.4.5.6.7.8.9]\*(C'\fR is not. \fIMakefile.PL\fR authors might
1166have to take this into account, but at least they can refer to the former
1167as \f(CW\*(C`/PERL_ROOT/lib/2/3/4/5/6/7/8/\*(C'\fR.
1168.PP
1169The VMS::Filespec module, which gets installed as part of the build
1170process on \s-1VMS\s0, is a pure Perl module that can easily be installed on
1171non-VMS platforms and can be helpful for conversions to and from \s-1RMS\s0
1172native formats.
1173.PP
1174What \f(CW\*(C`\en\*(C'\fR represents depends on the type of file opened. It usually
1175represents \f(CW\*(C`\e012\*(C'\fR but it could also be \f(CW\*(C`\e015\*(C'\fR, \f(CW\*(C`\e012\*(C'\fR, \f(CW\*(C`\e015\e012\*(C'\fR,
1176\&\f(CW\*(C`\e000\*(C'\fR, \f(CW\*(C`\e040\*(C'\fR, or nothing depending on the file organiztion and
1177record format. The VMS::Stdio module provides access to the
1178special \fIfopen()\fR requirements of files with unusual attributes on \s-1VMS\s0.
1179.PP
1180\&\s-1TCP/IP\s0 stacks are optional on \s-1VMS\s0, so socket routines might not be
1181implemented. \s-1UDP\s0 sockets may not be supported.
1182.PP
1183The value of \f(CW$^O\fR on OpenVMS is \*(L"\s-1VMS\s0\*(R". To determine the architecture
1184that you are running on without resorting to loading all of \f(CW%Config\fR
1185you can examine the content of the \f(CW@INC\fR array like so:
1186.PP
1187.Vb 2
1188\& if (grep(/VMS_AXP/, @INC)) {
1189\& print "I'm on Alpha!\en";
1190.Ve
1191.PP
1192.Vb 2
1193\& } elsif (grep(/VMS_VAX/, @INC)) {
1194\& print "I'm on VAX!\en";
1195.Ve
1196.PP
1197.Vb 3
1198\& } else {
1199\& print "I'm not so sure about where $^O is...\en";
1200\& }
1201.Ve
1202.PP
1203On \s-1VMS\s0, perl determines the \s-1UTC\s0 offset from the \f(CW\*(C`SYS$TIMEZONE_DIFFERENTIAL\*(C'\fR
1204logical name. Although the \s-1VMS\s0 epoch began at 17\-NOV\-1858 00:00:00.00,
1205calls to \f(CW\*(C`localtime\*(C'\fR are adjusted to count offsets from
120601\-JAN\-1970 00:00:00.00, just like Unix.
1207.PP
1208Also see:
1209.IP "\(bu" 4
1210\&\fI\s-1README\s0.vms\fR (installed as README_vms), perlvms
1211.IP "\(bu" 4
1212vmsperl list, majordomo@perl.org
1213.Sp
1214(Put the words \f(CW\*(C`subscribe vmsperl\*(C'\fR in message body.)
1215.IP "\(bu" 4
1216vmsperl on the web, http://www.sidhe.org/vmsperl/index.html
1217.Sh "\s-1VOS\s0"
1218.IX Subsection "VOS"
1219Perl on \s-1VOS\s0 is discussed in \fI\s-1README\s0.vos\fR in the perl distribution
1220(installed as perlvos). Perl on \s-1VOS\s0 can accept either \s-1VOS\-\s0 or
1221Unix-style file specifications as in either of the following:
1222.PP
1223.Vb 2
1224\& C<< $ perl -ne "print if /perl_setup/i" >system>notices >>
1225\& C<< $ perl -ne "print if /perl_setup/i" /system/notices >>
1226.Ve
1227.PP
1228or even a mixture of both as in:
1229.PP
1230.Vb 1
1231\& C<< $ perl -ne "print if /perl_setup/i" >system/notices >>
1232.Ve
1233.PP
1234Even though \s-1VOS\s0 allows the slash character to appear in object
1235names, because the \s-1VOS\s0 port of Perl interprets it as a pathname
1236delimiting character, \s-1VOS\s0 files, directories, or links whose names
1237contain a slash character cannot be processed. Such files must be
1238renamed before they can be processed by Perl. Note that \s-1VOS\s0 limits
1239file names to 32 or fewer characters.
1240.PP
1241Perl on \s-1VOS\s0 can be built using two different compilers and two different
1242versions of the \s-1POSIX\s0 runtime. The recommended method for building full
1243Perl is with the \s-1GNU\s0 C compiler and the generally-available version of
1244\&\s-1VOS\s0 \s-1POSIX\s0 support. See \fI\s-1README\s0.vos\fR (installed as perlvos) for
1245restrictions that apply when Perl is built using the \s-1VOS\s0 Standard C
1246compiler or the alpha version of \s-1VOS\s0 \s-1POSIX\s0 support.
1247.PP
1248The value of \f(CW$^O\fR on \s-1VOS\s0 is \*(L"\s-1VOS\s0\*(R". To determine the architecture that
1249you are running on without resorting to loading all of \f(CW%Config\fR you
1250can examine the content of the \f(CW@INC\fR array like so:
1251.PP
1252.Vb 6
1253\& if ($^O =~ /VOS/) {
1254\& print "I'm on a Stratus box!\en";
1255\& } else {
1256\& print "I'm not on a Stratus box!\en";
1257\& die;
1258\& }
1259.Ve
1260.PP
1261.Vb 2
1262\& if (grep(/860/, @INC)) {
1263\& print "This box is a Stratus XA/R!\en";
1264.Ve
1265.PP
1266.Vb 2
1267\& } elsif (grep(/7100/, @INC)) {
1268\& print "This box is a Stratus HP 7100 or 8xxx!\en";
1269.Ve
1270.PP
1271.Vb 2
1272\& } elsif (grep(/8000/, @INC)) {
1273\& print "This box is a Stratus HP 8xxx!\en";
1274.Ve
1275.PP
1276.Vb 3
1277\& } else {
1278\& print "This box is a Stratus 68K!\en";
1279\& }
1280.Ve
1281.PP
1282Also see:
1283.IP "\(bu" 4
1284\&\fI\s-1README\s0.vos\fR (installed as perlvos)
1285.IP "\(bu" 4
1286The \s-1VOS\s0 mailing list.
1287.Sp
1288There is no specific mailing list for Perl on \s-1VOS\s0. You can post
1289comments to the comp.sys.stratus newsgroup, or subscribe to the general
1290Stratus mailing list. Send a letter with \*(L"subscribe Info\-Stratus\*(R" in
1291the message body to majordomo@list.stratagy.com.
1292.IP "\(bu" 4
1293\&\s-1VOS\s0 Perl on the web at http://ftp.stratus.com/pub/vos/posix/posix.html
1294.Sh "\s-1EBCDIC\s0 Platforms"
1295.IX Subsection "EBCDIC Platforms"
1296Recent versions of Perl have been ported to platforms such as \s-1OS/400\s0 on
1297\&\s-1AS/400\s0 minicomputers as well as \s-1OS/390\s0, \s-1VM/ESA\s0, and \s-1BS2000\s0 for S/390
1298Mainframes. Such computers use \s-1EBCDIC\s0 character sets internally (usually
1299Character Code Set \s-1ID\s0 0037 for \s-1OS/400\s0 and either 1047 or POSIX-BC for S/390
1300systems). On the mainframe perl currently works under the \*(L"Unix system
1301services for \s-1OS/390\s0\*(R" (formerly known as OpenEdition), \s-1VM/ESA\s0 OpenEdition, or
1302the \s-1BS200\s0 POSIX-BC system (\s-1BS2000\s0 is supported in perl 5.6 and greater).
1303See perlos390 for details.
1304.PP
1305As of R2.5 of \s-1USS\s0 for \s-1OS/390\s0 and Version 2.3 of \s-1VM/ESA\s0 these Unix
1306sub-systems do not support the \f(CW\*(C`#!\*(C'\fR shebang trick for script invocation.
1307Hence, on \s-1OS/390\s0 and \s-1VM/ESA\s0 perl scripts can be executed with a header
1308similar to the following simple script:
1309.PP
1310.Vb 4
1311\& : # use perl
1312\& eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
1313\& if 0;
1314\& #!/usr/local/bin/perl # just a comment really
1315.Ve
1316.PP
1317.Vb 1
1318\& print "Hello from perl!\en";
1319.Ve
1320.PP
1321\&\s-1OS/390\s0 will support the \f(CW\*(C`#!\*(C'\fR shebang trick in release 2.8 and beyond.
1322Calls to \f(CW\*(C`system\*(C'\fR and backticks can use \s-1POSIX\s0 shell syntax on all
1323S/390 systems.
1324.PP
1325On the \s-1AS/400\s0, if \s-1PERL5\s0 is in your library list, you may need
1326to wrap your perl scripts in a \s-1CL\s0 procedure to invoke them like so:
1327.PP
1328.Vb 3
1329\& BEGIN
1330\& CALL PGM(PERL5/PERL) PARM('/QOpenSys/hello.pl')
1331\& ENDPGM
1332.Ve
1333.PP
1334This will invoke the perl script \fIhello.pl\fR in the root of the
1335QOpenSys file system. On the \s-1AS/400\s0 calls to \f(CW\*(C`system\*(C'\fR or backticks
1336must use \s-1CL\s0 syntax.
1337.PP
1338On these platforms, bear in mind that the \s-1EBCDIC\s0 character set may have
1339an effect on what happens with some perl functions (such as \f(CW\*(C`chr\*(C'\fR,
1340\&\f(CW\*(C`pack\*(C'\fR, \f(CW\*(C`print\*(C'\fR, \f(CW\*(C`printf\*(C'\fR, \f(CW\*(C`ord\*(C'\fR, \f(CW\*(C`sort\*(C'\fR, \f(CW\*(C`sprintf\*(C'\fR, \f(CW\*(C`unpack\*(C'\fR), as
1341well as bit-fiddling with \s-1ASCII\s0 constants using operators like \f(CW\*(C`^\*(C'\fR, \f(CW\*(C`&\*(C'\fR
1342and \f(CW\*(C`|\*(C'\fR, not to mention dealing with socket interfaces to \s-1ASCII\s0 computers
1343(see \*(L"Newlines\*(R").
1344.PP
1345Fortunately, most web servers for the mainframe will correctly
1346translate the \f(CW\*(C`\en\*(C'\fR in the following statement to its \s-1ASCII\s0 equivalent
1347(\f(CW\*(C`\er\*(C'\fR is the same under both Unix and \s-1OS/390\s0 & \s-1VM/ESA\s0):
1348.PP
1349.Vb 1
1350\& print "Content-type: text/html\er\en\er\en";
1351.Ve
1352.PP
1353The values of \f(CW$^O\fR on some of these platforms includes:
1354.PP
1355.Vb 6
1356\& uname $^O $Config{'archname'}
1357\& --------------------------------------------
1358\& OS/390 os390 os390
1359\& OS400 os400 os400
1360\& POSIX-BC posix-bc BS2000-posix-bc
1361\& VM/ESA vmesa vmesa
1362.Ve
1363.PP
1364Some simple tricks for determining if you are running on an \s-1EBCDIC\s0
1365platform could include any of the following (perhaps all):
1366.PP
1367.Vb 1
1368\& if ("\et" eq "\e05") { print "EBCDIC may be spoken here!\en"; }
1369.Ve
1370.PP
1371.Vb 1
1372\& if (ord('A') == 193) { print "EBCDIC may be spoken here!\en"; }
1373.Ve
1374.PP
1375.Vb 1
1376\& if (chr(169) eq 'z') { print "EBCDIC may be spoken here!\en"; }
1377.Ve
1378.PP
1379One thing you may not want to rely on is the \s-1EBCDIC\s0 encoding
1380of punctuation characters since these may differ from code page to code
1381page (and once your module or script is rumoured to work with \s-1EBCDIC\s0,
1382folks will want it to work with all \s-1EBCDIC\s0 character sets).
1383.PP
1384Also see:
1385.IP "\(bu" 4
1386*
1387.Sp
1388perlos390, \fI\s-1README\s0.os390\fR, \fIperlbs2000\fR, \fI\s-1README\s0.vmesa\fR,
1389perlebcdic.
1390.IP "\(bu" 4
1391The perl\-mvs@perl.org list is for discussion of porting issues as well as
1392general usage issues for all \s-1EBCDIC\s0 Perls. Send a message body of
1393\&\*(L"subscribe perl\-mvs\*(R" to majordomo@perl.org.
1394.IP "\(bu" 4
1395\&\s-1AS/400\s0 Perl information at
1396http://as400.rochester.ibm.com/
1397as well as on \s-1CPAN\s0 in the \fIports/\fR directory.
1398.Sh "Acorn \s-1RISC\s0 \s-1OS\s0"
1399.IX Subsection "Acorn RISC OS"
1400Because Acorns use \s-1ASCII\s0 with newlines (\f(CW\*(C`\en\*(C'\fR) in text files as \f(CW\*(C`\e012\*(C'\fR like
1401Unix, and because Unix filename emulation is turned on by default,
1402most simple scripts will probably work \*(L"out of the box\*(R". The native
1403filesystem is modular, and individual filesystems are free to be
1404case-sensitive or insensitive, and are usually case\-preserving. Some
1405native filesystems have name length limits, which file and directory
1406names are silently truncated to fit. Scripts should be aware that the
1407standard filesystem currently has a name length limit of \fB10\fR
1408characters, with up to 77 items in a directory, but other filesystems
1409may not impose such limitations.
1410.PP
1411Native filenames are of the form
1412.PP
1413.Vb 1
1414\& Filesystem#Special_Field::DiskName.$.Directory.Directory.File
1415.Ve
1416.PP
1417where
1418.PP
1419.Vb 8
1420\& Special_Field is not usually present, but may contain . and $ .
1421\& Filesystem =~ m|[A-Za-z0-9_]|
1422\& DsicName =~ m|[A-Za-z0-9_/]|
1423\& $ represents the root directory
1424\& . is the path separator
1425\& @ is the current directory (per filesystem but machine global)
1426\& ^ is the parent directory
1427\& Directory and File =~ m|[^\e0- "\e.\e$\e%\e&:\e@\e\e^\e|\e177]+|
1428.Ve
1429.PP
1430The default filename translation is roughly \f(CW\*(C`tr|/.|./|;\*(C'\fR
1431.PP
1432Note that \f(CW\*(C`"ADFS::HardDisk.$.File" ne 'ADFS::HardDisk.$.File'\*(C'\fR and that
1433the second stage of \f(CW\*(C`$\*(C'\fR interpolation in regular expressions will fall
1434foul of the \f(CW$.\fR if scripts are not careful.
1435.PP
1436Logical paths specified by system variables containing comma-separated
1437search lists are also allowed; hence \f(CW\*(C`System:Modules\*(C'\fR is a valid
1438filename, and the filesystem will prefix \f(CW\*(C`Modules\*(C'\fR with each section of
1439\&\f(CW\*(C`System$Path\*(C'\fR until a name is made that points to an object on disk.
1440Writing to a new file \f(CW\*(C`System:Modules\*(C'\fR would be allowed only if
1441\&\f(CW\*(C`System$Path\*(C'\fR contains a single item list. The filesystem will also
1442expand system variables in filenames if enclosed in angle brackets, so
1443\&\f(CW\*(C`<System$Dir>.Modules\*(C'\fR would look for the file
1444\&\f(CW\*(C`$ENV{'System$Dir'}\ .\ 'Modules'\*(C'\fR. The obvious implication of this is
1445that \fBfully qualified filenames can start with \f(CB\*(C`<>\*(C'\fB\fR and should
1446be protected when \f(CW\*(C`open\*(C'\fR is used for input.
1447.PP
1448Because \f(CW\*(C`.\*(C'\fR was in use as a directory separator and filenames could not
1449be assumed to be unique after 10 characters, Acorn implemented the C
1450compiler to strip the trailing \f(CW\*(C`.c\*(C'\fR \f(CW\*(C`.h\*(C'\fR \f(CW\*(C`.s\*(C'\fR and \f(CW\*(C`.o\*(C'\fR suffix from
1451filenames specified in source code and store the respective files in
1452subdirectories named after the suffix. Hence files are translated:
1453.PP
1454.Vb 6
1455\& foo.h h.foo
1456\& C:foo.h C:h.foo (logical path variable)
1457\& sys/os.h sys.h.os (C compiler groks Unix-speak)
1458\& 10charname.c c.10charname
1459\& 10charname.o o.10charname
1460\& 11charname_.c c.11charname (assuming filesystem truncates at 10)
1461.Ve
1462.PP
1463The Unix emulation library's translation of filenames to native assumes
1464that this sort of translation is required, and it allows a user-defined list
1465of known suffixes that it will transpose in this fashion. This may
1466seem transparent, but consider that with these rules \f(CW\*(C`foo/bar/baz.h\*(C'\fR
1467and \f(CW\*(C`foo/bar/h/baz\*(C'\fR both map to \f(CW\*(C`foo.bar.h.baz\*(C'\fR, and that \f(CW\*(C`readdir\*(C'\fR and
1468\&\f(CW\*(C`glob\*(C'\fR cannot and do not attempt to emulate the reverse mapping. Other
1469\&\f(CW\*(C`.\*(C'\fR's in filenames are translated to \f(CW\*(C`/\*(C'\fR.
1470.PP
1471As implied above, the environment accessed through \f(CW%ENV\fR is global, and
1472the convention is that program specific environment variables are of the
1473form \f(CW\*(C`Program$Name\*(C'\fR. Each filesystem maintains a current directory,
1474and the current filesystem's current directory is the \fBglobal\fR current
1475directory. Consequently, sociable programs don't change the current
1476directory but rely on full pathnames, and programs (and Makefiles) cannot
1477assume that they can spawn a child process which can change the current
1478directory without affecting its parent (and everyone else for that
1479matter).
1480.PP
1481Because native operating system filehandles are global and are currently
1482allocated down from 255, with 0 being a reserved value, the Unix emulation
1483library emulates Unix filehandles. Consequently, you can't rely on
1484passing \f(CW\*(C`STDIN\*(C'\fR, \f(CW\*(C`STDOUT\*(C'\fR, or \f(CW\*(C`STDERR\*(C'\fR to your children.
1485.PP
1486The desire of users to express filenames of the form
1487\&\f(CW\*(C`<Foo$Dir>.Bar\*(C'\fR on the command line unquoted causes problems,
1488too: \f(CW``\fR command output capture has to perform a guessing game. It
1489assumes that a string \f(CW\*(C`<[^<>]+\e$[^<>]>\*(C'\fR is a
1490reference to an environment variable, whereas anything else involving
1491\&\f(CW\*(C`<\*(C'\fR or \f(CW\*(C`>\*(C'\fR is redirection, and generally manages to be 99%
1492right. Of course, the problem remains that scripts cannot rely on any
1493Unix tools being available, or that any tools found have Unix-like command
1494line arguments.
1495.PP
1496Extensions and \s-1XS\s0 are, in theory, buildable by anyone using free
1497tools. In practice, many don't, as users of the Acorn platform are
1498used to binary distributions. MakeMaker does run, but no available
1499make currently copes with MakeMaker's makefiles; even if and when
1500this should be fixed, the lack of a Unix-like shell will cause
1501problems with makefile rules, especially lines of the form \f(CW\*(C`cd
1502sdbm && make all\*(C'\fR, and anything using quoting.
1503.PP
1504"\s-1RISC\s0\ \s-1OS\s0" is the proper name for the operating system, but the value
1505in \f(CW$^O\fR is \*(L"riscos\*(R" (because we don't like shouting).
1506.Sh "Other perls"
1507.IX Subsection "Other perls"
1508Perl has been ported to many platforms that do not fit into any of
1509the categories listed above. Some, such as AmigaOS, Atari MiNT,
1510BeOS, \s-1HP\s0 MPE/iX, \s-1QNX\s0, Plan 9, and \s-1VOS\s0, have been well-integrated
1511into the standard Perl source code kit. You may need to see the
1512\&\fIports/\fR directory on \s-1CPAN\s0 for information, and possibly binaries,
1513for the likes of: aos, Atari \s-1ST\s0, lynxos, riscos, Novell Netware,
1514Tandem Guardian, \fIetc.\fR (Yes, we know that some of these OSes may
1515fall under the Unix category, but we are not a standards body.)
1516.PP
1517Some approximate operating system names and their \f(CW$^O\fR values
1518in the \*(L"\s-1OTHER\s0\*(R" category include:
1519.PP
1520.Vb 5
1521\& OS $^O $Config{'archname'}
1522\& ------------------------------------------
1523\& Amiga DOS amigaos m68k-amigos
1524\& BeOS beos
1525\& MPE/iX mpeix PA-RISC1.1
1526.Ve
1527.PP
1528See also:
1529.IP "\(bu" 4
1530Amiga, \fI\s-1README\s0.amiga\fR (installed as perlamiga).
1531.IP "\(bu" 4
1532Atari, \fI\s-1README\s0.mint\fR and Guido Flohr's web page
1533http://stud.uni\-sb.de/~gufl0000/
1534.IP "\(bu" 4
1535Be \s-1OS\s0, \fI\s-1README\s0.beos\fR
1536.IP "\(bu" 4
1537\&\s-1HP\s0 300 MPE/iX, \fI\s-1README\s0.mpeix\fR and Mark Bixby's web page
1538http://www.bixby.org/mark/perlix.html
1539.IP "\(bu" 4
1540A free perl5\-based \s-1PERL\s0.NLM for Novell Netware is available in
1541precompiled binary and source code form from http://www.novell.com/
1542as well as from \s-1CPAN\s0.
1543.IP "\(bu" 4
1544Plan\ 9, \fI\s-1README\s0.plan9\fR
1545.SH "FUNCTION IMPLEMENTATIONS"
1546.IX Header "FUNCTION IMPLEMENTATIONS"
1547Listed below are functions that are either completely unimplemented
1548or else have been implemented differently on various platforms.
1549Following each description will be, in parentheses, a list of
1550platforms that the description applies to.
1551.PP
1552The list may well be incomplete, or even wrong in some places. When
1553in doubt, consult the platform-specific \s-1README\s0 files in the Perl
1554source distribution, and any other documentation resources accompanying
1555a given port.
1556.PP
1557Be aware, moreover, that even among Unix-ish systems there are variations.
1558.PP
1559For many functions, you can also query \f(CW%Config\fR, exported by
1560default from the Config module. For example, to check whether the
1561platform has the \f(CW\*(C`lstat\*(C'\fR call, check \f(CW$Config{d_lstat}\fR. See
1562Config for a full description of available variables.
1563.Sh "Alphabetical Listing of Perl Functions"
1564.IX Subsection "Alphabetical Listing of Perl Functions"
1565.IP "\-X \s-1FILEHANDLE\s0" 8
1566.IX Item "-X FILEHANDLE"
1567.PD 0
1568.IP "\-X \s-1EXPR\s0" 8
1569.IX Item "-X EXPR"
1570.IP "\-X" 8
1571.IX Item "-X"
1572.PD
1573\&\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, and \f(CW\*(C`\-x\*(C'\fR have a limited meaning only; directories
1574and applications are executable, and there are no uid/gid
1575considerations. \f(CW\*(C`\-o\*(C'\fR is not supported. (Mac\ \s-1OS\s0)
1576.Sp
1577\&\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, and \f(CW\*(C`\-o\*(C'\fR tell whether the file is accessible,
1578which may not reflect UIC-based file protections. (\s-1VMS\s0)
1579.Sp
1580\&\f(CW\*(C`\-s\*(C'\fR returns the size of the data fork, not the total size of data fork
1581plus resource fork. (Mac\ \s-1OS\s0).
1582.Sp
1583\&\f(CW\*(C`\-s\*(C'\fR by name on an open file will return the space reserved on disk,
1584rather than the current extent. \f(CW\*(C`\-s\*(C'\fR on an open filehandle returns the
1585current size. (\s-1RISC\s0\ \s-1OS\s0)
1586.Sp
1587\&\f(CW\*(C`\-R\*(C'\fR, \f(CW\*(C`\-W\*(C'\fR, \f(CW\*(C`\-X\*(C'\fR, \f(CW\*(C`\-O\*(C'\fR are indistinguishable from \f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR,
1588\&\f(CW\*(C`\-x\*(C'\fR, \f(CW\*(C`\-o\*(C'\fR. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1589.Sp
1590\&\f(CW\*(C`\-b\*(C'\fR, \f(CW\*(C`\-c\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR, \f(CW\*(C`\-g\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR, \f(CW\*(C`\-u\*(C'\fR, \f(CW\*(C`\-A\*(C'\fR are not implemented.
1591(Mac\ \s-1OS\s0)
1592.Sp
1593\&\f(CW\*(C`\-g\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR, \f(CW\*(C`\-l\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR, \f(CW\*(C`\-u\*(C'\fR, \f(CW\*(C`\-A\*(C'\fR are not particularly meaningful.
1594(Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1595.Sp
1596\&\f(CW\*(C`\-d\*(C'\fR is true if passed a device spec without an explicit directory.
1597(\s-1VMS\s0)
1598.Sp
1599\&\f(CW\*(C`\-T\*(C'\fR and \f(CW\*(C`\-B\*(C'\fR are implemented, but might misclassify Mac text files
1600with foreign characters; this is the case will all platforms, but may
1601affect Mac\ \s-1OS\s0 often. (Mac\ \s-1OS\s0)
1602.Sp
1603\&\f(CW\*(C`\-x\*(C'\fR (or \f(CW\*(C`\-X\*(C'\fR) determine if a file ends in one of the executable
1604suffixes. \f(CW\*(C`\-S\*(C'\fR is meaningless. (Win32)
1605.Sp
1606\&\f(CW\*(C`\-x\*(C'\fR (or \f(CW\*(C`\-X\*(C'\fR) determine if a file has an executable file type.
1607(\s-1RISC\s0\ \s-1OS\s0)
1608.IP "alarm \s-1SECONDS\s0" 8
1609.IX Item "alarm SECONDS"
1610.PD 0
1611.IP "alarm" 8
1612.IX Item "alarm"
1613.PD
1614Not implemented. (Win32)
1615.IP "binmode \s-1FILEHANDLE\s0" 8
1616.IX Item "binmode FILEHANDLE"
1617Meaningless. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0)
1618.Sp
1619Reopens file and restores pointer; if function fails, underlying
1620filehandle may be closed, or pointer may be in a different position.
1621(\s-1VMS\s0)
1622.Sp
1623The value returned by \f(CW\*(C`tell\*(C'\fR may be affected after the call, and
1624the filehandle may be flushed. (Win32)
1625.IP "chmod \s-1LIST\s0" 8
1626.IX Item "chmod LIST"
1627Only limited meaning. Disabling/enabling write permission is mapped to
1628locking/unlocking the file. (Mac\ \s-1OS\s0)
1629.Sp
1630Only good for changing \*(L"owner\*(R" read-write access, \*(L"group\*(R", and \*(L"other\*(R"
1631bits are meaningless. (Win32)
1632.Sp
1633Only good for changing \*(L"owner\*(R" and \*(L"other\*(R" read-write access. (\s-1RISC\s0\ \s-1OS\s0)
1634.Sp
1635Access permissions are mapped onto \s-1VOS\s0 access-control list changes. (\s-1VOS\s0)
1636.Sp
1637The actual permissions set depend on the value of the \f(CW\*(C`CYGWIN\*(C'\fR
1638in the \s-1SYSTEM\s0 environment settings. (Cygwin)
1639.IP "chown \s-1LIST\s0" 8
1640.IX Item "chown LIST"
1641Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1642.Sp
1643Does nothing, but won't fail. (Win32)
1644.IP "chroot \s-1FILENAME\s0" 8
1645.IX Item "chroot FILENAME"
1646.PD 0
1647.IP "chroot" 8
1648.IX Item "chroot"
1649.PD
1650Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0)
1651.IP "crypt \s-1PLAINTEXT\s0,SALT" 8
1652.IX Item "crypt PLAINTEXT,SALT"
1653May not be available if library or source was not provided when building
1654perl. (Win32)
1655.Sp
1656Not implemented. (\s-1VOS\s0)
1657.IP "dbmclose \s-1HASH\s0" 8
1658.IX Item "dbmclose HASH"
1659Not implemented. (\s-1VMS\s0, Plan\ 9, \s-1VOS\s0)
1660.IP "dbmopen \s-1HASH\s0,DBNAME,MODE" 8
1661.IX Item "dbmopen HASH,DBNAME,MODE"
1662Not implemented. (\s-1VMS\s0, Plan\ 9, \s-1VOS\s0)
1663.IP "dump \s-1LABEL\s0" 8
1664.IX Item "dump LABEL"
1665Not useful. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0)
1666.Sp
1667Not implemented. (Win32)
1668.Sp
1669Invokes \s-1VMS\s0 debugger. (\s-1VMS\s0)
1670.IP "exec \s-1LIST\s0" 8
1671.IX Item "exec LIST"
1672Not implemented. (Mac\ \s-1OS\s0)
1673.Sp
1674Implemented via Spawn. (\s-1VM/ESA\s0)
1675.Sp
1676Does not automatically flush output handles on some platforms.
1677(SunOS, Solaris, \s-1HP\-UX\s0)
1678.IP "exit \s-1EXPR\s0" 8
1679.IX Item "exit EXPR"
1680.PD 0
1681.IP "exit" 8
1682.IX Item "exit"
1683.PD
1684Emulates \s-1UNIX\s0 \fIexit()\fR (which considers \f(CW\*(C`exit 1\*(C'\fR to indicate an error) by
1685mapping the \f(CW1\fR to \s-1SS$_ABORT\s0 (\f(CW44\fR). This behavior may be overridden
1686with the pragma \f(CW\*(C`use vmsish 'exit'\*(C'\fR. As with the \s-1CRTL\s0's \fIexit()\fR
1687function, \f(CW\*(C`exit 0\*(C'\fR is also mapped to an exit status of \s-1SS$_NORMAL\s0
1688(\f(CW1\fR); this mapping cannot be overridden. Any other argument to \fIexit()\fR
1689is used directly as Perl's exit status. (\s-1VMS\s0)
1690.IP "fcntl \s-1FILEHANDLE\s0,FUNCTION,SCALAR" 8
1691.IX Item "fcntl FILEHANDLE,FUNCTION,SCALAR"
1692Not implemented. (Win32, \s-1VMS\s0)
1693.IP "flock \s-1FILEHANDLE\s0,OPERATION" 8
1694.IX Item "flock FILEHANDLE,OPERATION"
1695Not implemented (Mac\ \s-1OS\s0, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0).
1696.Sp
1697Available only on Windows \s-1NT\s0 (not on Windows 95). (Win32)
1698.IP "fork" 8
1699.IX Item "fork"
1700Not implemented. (Mac\ \s-1OS\s0, AmigaOS, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0, \s-1VMS\s0)
1701.Sp
1702Emulated using multiple interpreters. See perlfork. (Win32)
1703.Sp
1704Does not automatically flush output handles on some platforms.
1705(SunOS, Solaris, \s-1HP\-UX\s0)
1706.IP "getlogin" 8
1707.IX Item "getlogin"
1708Not implemented. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0)
1709.IP "getpgrp \s-1PID\s0" 8
1710.IX Item "getpgrp PID"
1711Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1712.IP "getppid" 8
1713.IX Item "getppid"
1714Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0)
1715.IP "getpriority \s-1WHICH\s0,WHO" 8
1716.IX Item "getpriority WHICH,WHO"
1717Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0)
1718.IP "getpwnam \s-1NAME\s0" 8
1719.IX Item "getpwnam NAME"
1720Not implemented. (Mac\ \s-1OS\s0, Win32)
1721.Sp
1722Not useful. (\s-1RISC\s0\ \s-1OS\s0)
1723.IP "getgrnam \s-1NAME\s0" 8
1724.IX Item "getgrnam NAME"
1725Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1726.IP "getnetbyname \s-1NAME\s0" 8
1727.IX Item "getnetbyname NAME"
1728Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1729.IP "getpwuid \s-1UID\s0" 8
1730.IX Item "getpwuid UID"
1731Not implemented. (Mac\ \s-1OS\s0, Win32)
1732.Sp
1733Not useful. (\s-1RISC\s0\ \s-1OS\s0)
1734.IP "getgrgid \s-1GID\s0" 8
1735.IX Item "getgrgid GID"
1736Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1737.IP "getnetbyaddr \s-1ADDR\s0,ADDRTYPE" 8
1738.IX Item "getnetbyaddr ADDR,ADDRTYPE"
1739Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1740.IP "getprotobynumber \s-1NUMBER\s0" 8
1741.IX Item "getprotobynumber NUMBER"
1742Not implemented. (Mac\ \s-1OS\s0)
1743.IP "getservbyport \s-1PORT\s0,PROTO" 8
1744.IX Item "getservbyport PORT,PROTO"
1745Not implemented. (Mac\ \s-1OS\s0)
1746.IP "getpwent" 8
1747.IX Item "getpwent"
1748Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VM/ESA\s0)
1749.IP "getgrent" 8
1750.IX Item "getgrent"
1751Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1VM/ESA\s0)
1752.IP "gethostent" 8
1753.IX Item "gethostent"
1754Not implemented. (Mac\ \s-1OS\s0, Win32)
1755.IP "getnetent" 8
1756.IX Item "getnetent"
1757Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1758.IP "getprotoent" 8
1759.IX Item "getprotoent"
1760Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1761.IP "getservent" 8
1762.IX Item "getservent"
1763Not implemented. (Win32, Plan\ 9)
1764.IP "sethostent \s-1STAYOPEN\s0" 8
1765.IX Item "sethostent STAYOPEN"
1766Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0)
1767.IP "setnetent \s-1STAYOPEN\s0" 8
1768.IX Item "setnetent STAYOPEN"
1769Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0)
1770.IP "setprotoent \s-1STAYOPEN\s0" 8
1771.IX Item "setprotoent STAYOPEN"
1772Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0)
1773.IP "setservent \s-1STAYOPEN\s0" 8
1774.IX Item "setservent STAYOPEN"
1775Not implemented. (Plan\ 9, Win32, \s-1RISC\s0\ \s-1OS\s0)
1776.IP "endpwent" 8
1777.IX Item "endpwent"
1778Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VM/ESA\s0, Win32)
1779.IP "endgrent" 8
1780.IX Item "endgrent"
1781Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1RISC\s0\ \s-1OS\s0, \s-1VM/ESA\s0, \s-1VMS\s0, Win32)
1782.IP "endhostent" 8
1783.IX Item "endhostent"
1784Not implemented. (Mac\ \s-1OS\s0, Win32)
1785.IP "endnetent" 8
1786.IX Item "endnetent"
1787Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1788.IP "endprotoent" 8
1789.IX Item "endprotoent"
1790Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9)
1791.IP "endservent" 8
1792.IX Item "endservent"
1793Not implemented. (Plan\ 9, Win32)
1794.IP "getsockopt \s-1SOCKET\s0,LEVEL,OPTNAME" 8
1795.IX Item "getsockopt SOCKET,LEVEL,OPTNAME"
1796Not implemented. (Plan\ 9)
1797.IP "glob \s-1EXPR\s0" 8
1798.IX Item "glob EXPR"
1799.PD 0
1800.IP "glob" 8
1801.IX Item "glob"
1802.PD
1803This operator is implemented via the File::Glob extension on most
1804platforms. See File::Glob for portability information.
1805.IP "ioctl \s-1FILEHANDLE\s0,FUNCTION,SCALAR" 8
1806.IX Item "ioctl FILEHANDLE,FUNCTION,SCALAR"
1807Not implemented. (\s-1VMS\s0)
1808.Sp
1809Available only for socket handles, and it does what the \fIioctlsocket()\fR call
1810in the Winsock \s-1API\s0 does. (Win32)
1811.Sp
1812Available only for socket handles. (\s-1RISC\s0\ \s-1OS\s0)
1813.IP "kill \s-1SIGNAL\s0, \s-1LIST\s0" 8
1814.IX Item "kill SIGNAL, LIST"
1815\&\f(CW\*(C`kill(0, LIST)\*(C'\fR is implemented for the sake of taint checking;
1816use with other signals is unimplemented. (Mac\ \s-1OS\s0)
1817.Sp
1818Not implemented, hence not useful for taint checking. (\s-1RISC\s0\ \s-1OS\s0)
1819.Sp
1820\&\f(CW\*(C`kill()\*(C'\fR doesn't have the semantics of \f(CW\*(C`raise()\*(C'\fR, i.e. it doesn't send
1821a signal to the identified process like it does on Unix platforms.
1822Instead \f(CW\*(C`kill($sig, $pid)\*(C'\fR terminates the process identified by \f(CW$pid\fR,
1823and makes it exit immediately with exit status \f(CW$sig\fR. As in Unix, if
1824\&\f(CW$sig\fR is 0 and the specified process exists, it returns true without
1825actually terminating it. (Win32)
1826.IP "link \s-1OLDFILE\s0,NEWFILE" 8
1827.IX Item "link OLDFILE,NEWFILE"
1828Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1829.Sp
1830Link count not updated because hard links are not quite that hard
1831(They are sort of half-way between hard and soft links). (AmigaOS)
1832.Sp
1833Hard links are implemented on Win32 (Windows \s-1NT\s0 and Windows 2000)
1834under \s-1NTFS\s0 only.
1835.IP "lstat \s-1FILEHANDLE\s0" 8
1836.IX Item "lstat FILEHANDLE"
1837.PD 0
1838.IP "lstat \s-1EXPR\s0" 8
1839.IX Item "lstat EXPR"
1840.IP "lstat" 8
1841.IX Item "lstat"
1842.PD
1843Not implemented. (\s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1844.Sp
1845Return values (especially for device and inode) may be bogus. (Win32)
1846.IP "msgctl \s-1ID\s0,CMD,ARG" 8
1847.IX Item "msgctl ID,CMD,ARG"
1848.PD 0
1849.IP "msgget \s-1KEY\s0,FLAGS" 8
1850.IX Item "msgget KEY,FLAGS"
1851.IP "msgsnd \s-1ID\s0,MSG,FLAGS" 8
1852.IX Item "msgsnd ID,MSG,FLAGS"
1853.IP "msgrcv \s-1ID\s0,VAR,SIZE,TYPE,FLAGS" 8
1854.IX Item "msgrcv ID,VAR,SIZE,TYPE,FLAGS"
1855.PD
1856Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1857.IP "open \s-1FILEHANDLE\s0,EXPR" 8
1858.IX Item "open FILEHANDLE,EXPR"
1859.PD 0
1860.IP "open \s-1FILEHANDLE\s0" 8
1861.IX Item "open FILEHANDLE"
1862.PD
1863The \f(CW\*(C`|\*(C'\fR variants are supported only if ToolServer is installed.
1864(Mac\ \s-1OS\s0)
1865.Sp
1866open to \f(CW\*(C`|\-\*(C'\fR and \f(CW\*(C`\-|\*(C'\fR are unsupported. (Mac\ \s-1OS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0)
1867.Sp
1868Opening a process does not automatically flush output handles on some
1869platforms. (SunOS, Solaris, \s-1HP\-UX\s0)
1870.IP "pipe \s-1READHANDLE\s0,WRITEHANDLE" 8
1871.IX Item "pipe READHANDLE,WRITEHANDLE"
1872Very limited functionality. (MiNT)
1873.IP "readlink \s-1EXPR\s0" 8
1874.IX Item "readlink EXPR"
1875.PD 0
1876.IP "readlink" 8
1877.IX Item "readlink"
1878.PD
1879Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1880.IP "select \s-1RBITS\s0,WBITS,EBITS,TIMEOUT" 8
1881.IX Item "select RBITS,WBITS,EBITS,TIMEOUT"
1882Only implemented on sockets. (Win32, \s-1VMS\s0)
1883.Sp
1884Only reliable on sockets. (\s-1RISC\s0\ \s-1OS\s0)
1885.Sp
1886Note that the \f(CW\*(C`select FILEHANDLE\*(C'\fR form is generally portable.
1887.IP "semctl \s-1ID\s0,SEMNUM,CMD,ARG" 8
1888.IX Item "semctl ID,SEMNUM,CMD,ARG"
1889.PD 0
1890.IP "semget \s-1KEY\s0,NSEMS,FLAGS" 8
1891.IX Item "semget KEY,NSEMS,FLAGS"
1892.IP "semop \s-1KEY\s0,OPSTRING" 8
1893.IX Item "semop KEY,OPSTRING"
1894.PD
1895Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1896.IP "setgrent" 8
1897.IX Item "setgrent"
1898Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VMS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0)
1899.IP "setpgrp \s-1PID\s0,PGRP" 8
1900.IX Item "setpgrp PID,PGRP"
1901Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1902.IP "setpriority \s-1WHICH\s0,WHO,PRIORITY" 8
1903.IX Item "setpriority WHICH,WHO,PRIORITY"
1904Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1905.IP "setpwent" 8
1906.IX Item "setpwent"
1907Not implemented. (Mac\ \s-1OS\s0, MPE/iX, Win32, \s-1RISC\s0\ \s-1OS\s0)
1908.IP "setsockopt \s-1SOCKET\s0,LEVEL,OPTNAME,OPTVAL" 8
1909.IX Item "setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL"
1910Not implemented. (Plan\ 9)
1911.IP "shmctl \s-1ID\s0,CMD,ARG" 8
1912.IX Item "shmctl ID,CMD,ARG"
1913.PD 0
1914.IP "shmget \s-1KEY\s0,SIZE,FLAGS" 8
1915.IX Item "shmget KEY,SIZE,FLAGS"
1916.IP "shmread \s-1ID\s0,VAR,POS,SIZE" 8
1917.IX Item "shmread ID,VAR,POS,SIZE"
1918.IP "shmwrite \s-1ID\s0,STRING,POS,SIZE" 8
1919.IX Item "shmwrite ID,STRING,POS,SIZE"
1920.PD
1921Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0)
1922.IP "sockatmark \s-1SOCKET\s0" 8
1923.IX Item "sockatmark SOCKET"
1924A relatively recent addition to socket functions, may not
1925be implemented even in \s-1UNIX\s0 platforms.
1926.IP "socketpair \s-1SOCKET1\s0,SOCKET2,DOMAIN,TYPE,PROTOCOL" 8
1927.IX Item "socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL"
1928Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0)
1929.IP "stat \s-1FILEHANDLE\s0" 8
1930.IX Item "stat FILEHANDLE"
1931.PD 0
1932.IP "stat \s-1EXPR\s0" 8
1933.IX Item "stat EXPR"
1934.IP "stat" 8
1935.IX Item "stat"
1936.PD
1937Platforms that do not have rdev, blksize, or blocks will return these
1938as '', so numeric comparison or manipulation of these fields may cause
1939\&'not numeric' warnings.
1940.Sp
1941mtime and atime are the same thing, and ctime is creation time instead of
1942inode change time. (Mac\ \s-1OS\s0).
1943.Sp
1944ctime not supported on \s-1UFS\s0 (Mac\ \s-1OS\s0\ X).
1945.Sp
1946ctime is creation time instead of inode change time (Win32).
1947.Sp
1948device and inode are not meaningful. (Win32)
1949.Sp
1950device and inode are not necessarily reliable. (\s-1VMS\s0)
1951.Sp
1952mtime, atime and ctime all return the last modification time. Device and
1953inode are not necessarily reliable. (\s-1RISC\s0\ \s-1OS\s0)
1954.Sp
1955dev, rdev, blksize, and blocks are not available. inode is not
1956meaningful and will differ between stat calls on the same file. (os2)
1957.Sp
1958some versions of cygwin when doing a stat(\*(L"foo\*(R") and if not finding it
1959may then attempt to stat(\*(L"foo.exe\*(R") (Cygwin)
1960.IP "symlink \s-1OLDFILE\s0,NEWFILE" 8
1961.IX Item "symlink OLDFILE,NEWFILE"
1962Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
1963.IP "syscall \s-1LIST\s0" 8
1964.IX Item "syscall LIST"
1965Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0)
1966.IP "sysopen \s-1FILEHANDLE\s0,FILENAME,MODE,PERMS" 8
1967.IX Item "sysopen FILEHANDLE,FILENAME,MODE,PERMS"
1968The traditional \*(L"0\*(R", \*(L"1\*(R", and \*(L"2\*(R" MODEs are implemented with different
1969numeric values on some systems. The flags exported by \f(CW\*(C`Fcntl\*(C'\fR
1970(O_RDONLY, O_WRONLY, O_RDWR) should work everywhere though. (Mac\ \s-1OS\s0, \s-1OS/390\s0, \s-1VM/ESA\s0)
1971.IP "system \s-1LIST\s0" 8
1972.IX Item "system LIST"
1973In general, do not assume the \s-1UNIX/POSIX\s0 semantics that you can shift
1974\&\f(CW$?\fR right by eight to get the exit value, or that \f(CW\*(C`$? & 127\*(C'\fR
1975would give you the number of the signal that terminated the program,
1976or that \f(CW\*(C`$? & 128\*(C'\fR would test true if the program was terminated by a
1977coredump. Instead, use the \s-1POSIX\s0 W*() interfaces: for example, use
1978\&\s-1WIFEXITED\s0($?) and \s-1WEXITVALUE\s0($?) to test for a normal exit and the exit
1979value, \s-1WIFSIGNALED\s0($?) and \s-1WTERMSIG\s0($?) for a signal exit and the
1980signal. Core dumping is not a portable concept, so there's no portable
1981way to test for that.
1982.Sp
1983Only implemented if ToolServer is installed. (Mac\ \s-1OS\s0)
1984.Sp
1985As an optimization, may not call the command shell specified in
1986\&\f(CW$ENV{PERL5SHELL}\fR. \f(CW\*(C`system(1, @args)\*(C'\fR spawns an external
1987process and immediately returns its process designator, without
1988waiting for it to terminate. Return value may be used subsequently
1989in \f(CW\*(C`wait\*(C'\fR or \f(CW\*(C`waitpid\*(C'\fR. Failure to \fIspawn()\fR a subprocess is indicated
1990by setting $? to \*(L"255 << 8\*(R". \f(CW$?\fR is set in a way compatible with
1991Unix (i.e. the exitstatus of the subprocess is obtained by \*(L"$? >> 8\*(R",
1992as described in the documentation). (Win32)
1993.Sp
1994There is no shell to process metacharacters, and the native standard is
1995to pass a command line terminated by \*(L"\en\*(R" \*(L"\er\*(R" or \*(L"\e0\*(R" to the spawned
1996program. Redirection such as \f(CW\*(C`> foo\*(C'\fR is performed (if at all) by
1997the run time library of the spawned program. \f(CW\*(C`system\*(C'\fR \fIlist\fR will call
1998the Unix emulation library's \f(CW\*(C`exec\*(C'\fR emulation, which attempts to provide
1999emulation of the stdin, stdout, stderr in force in the parent, providing
2000the child program uses a compatible version of the emulation library.
2001\&\fIscalar\fR will call the native command line direct and no such emulation
2002of a child Unix program will exists. Mileage \fBwill\fR vary. (\s-1RISC\s0\ \s-1OS\s0)
2003.Sp
2004Far from being \s-1POSIX\s0 compliant. Because there may be no underlying
2005/bin/sh tries to work around the problem by forking and execing the
2006first token in its argument string. Handles basic redirection
2007(\*(L"<\*(R" or \*(L">\*(R") on its own behalf. (MiNT)
2008.Sp
2009Does not automatically flush output handles on some platforms.
2010(SunOS, Solaris, \s-1HP\-UX\s0)
2011.Sp
2012The return value is POSIX-like (shifted up by 8 bits), which only allows
2013room for a made-up value derived from the severity bits of the native
201432\-bit condition code (unless overridden by \f(CW\*(C`use vmsish 'status'\*(C'\fR).
2015For more details see \*(L"$?\*(R" in perlvms. (\s-1VMS\s0)
2016.IP "times" 8
2017.IX Item "times"
2018Only the first entry returned is nonzero. (Mac\ \s-1OS\s0)
2019.Sp
2020\&\*(L"cumulative\*(R" times will be bogus. On anything other than Windows \s-1NT\s0
2021or Windows 2000, \*(L"system\*(R" time will be bogus, and \*(L"user\*(R" time is
2022actually the time returned by the \fIclock()\fR function in the C runtime
2023library. (Win32)
2024.Sp
2025Not useful. (\s-1RISC\s0\ \s-1OS\s0)
2026.IP "truncate \s-1FILEHANDLE\s0,LENGTH" 8
2027.IX Item "truncate FILEHANDLE,LENGTH"
2028.PD 0
2029.IP "truncate \s-1EXPR\s0,LENGTH" 8
2030.IX Item "truncate EXPR,LENGTH"
2031.PD
2032Not implemented. (Older versions of \s-1VMS\s0)
2033.Sp
2034Truncation to zero-length only. (\s-1VOS\s0)
2035.Sp
2036If a \s-1FILEHANDLE\s0 is supplied, it must be writable and opened in append
2037mode (i.e., use \f(CW\*(C`open(FH, '>>filename')\*(C'\fR
2038or \f(CW\*(C`sysopen(FH,...,O_APPEND|O_RDWR)\*(C'\fR. If a filename is supplied, it
2039should not be held open elsewhere. (Win32)
2040.IP "umask \s-1EXPR\s0" 8
2041.IX Item "umask EXPR"
2042.PD 0
2043.IP "umask" 8
2044.IX Item "umask"
2045.PD
2046Returns undef where unavailable, as of version 5.005.
2047.Sp
2048\&\f(CW\*(C`umask\*(C'\fR works but the correct permissions are set only when the file
2049is finally closed. (AmigaOS)
2050.IP "utime \s-1LIST\s0" 8
2051.IX Item "utime LIST"
2052Only the modification time is updated. (BeOS, Mac\ \s-1OS\s0, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0)
2053.Sp
2054May not behave as expected. Behavior depends on the C runtime
2055library's implementation of \fIutime()\fR, and the filesystem being
2056used. The \s-1FAT\s0 filesystem typically does not support an \*(L"access
2057time\*(R" field, and it may limit timestamps to a granularity of
2058two seconds. (Win32)
2059.IP "wait" 8
2060.IX Item "wait"
2061.PD 0
2062.IP "waitpid \s-1PID\s0,FLAGS" 8
2063.IX Item "waitpid PID,FLAGS"
2064.PD
2065Not implemented. (Mac\ \s-1OS\s0, \s-1VOS\s0)
2066.Sp
2067Can only be applied to process handles returned for processes spawned
2068using \f(CW\*(C`system(1, ...)\*(C'\fR or pseudo processes created with \f(CW\*(C`fork()\*(C'\fR. (Win32)
2069.Sp
2070Not useful. (\s-1RISC\s0\ \s-1OS\s0)
2071.SH "CHANGES"
2072.IX Header "CHANGES"
2073.IP "v1.48, 02 February 2001" 4
2074.IX Item "v1.48, 02 February 2001"
2075Various updates from perl5\-porters over the past year, supported
2076platforms update from Jarkko Hietaniemi.
2077.IP "v1.47, 22 March 2000" 4
2078.IX Item "v1.47, 22 March 2000"
2079Various cleanups from Tom Christiansen, including migration of
2080long platform listings from perl.
2081.IP "v1.46, 12 February 2000" 4
2082.IX Item "v1.46, 12 February 2000"
2083Updates for \s-1VOS\s0 and MPE/iX. (Peter Prymmer) Other small changes.
2084.IP "v1.45, 20 December 1999" 4
2085.IX Item "v1.45, 20 December 1999"
2086Small changes from 5.005_63 distribution, more changes to \s-1EBCDIC\s0 info.
2087.IP "v1.44, 19 July 1999" 4
2088.IX Item "v1.44, 19 July 1999"
2089A bunch of updates from Peter Prymmer for \f(CW$^O\fR values,
2090endianness, File::Spec, \s-1VMS\s0, \s-1BS2000\s0, \s-1OS/400\s0.
2091.IP "v1.43, 24 May 1999" 4
2092.IX Item "v1.43, 24 May 1999"
2093Added a lot of cleaning up from Tom Christiansen.
2094.IP "v1.42, 22 May 1999" 4
2095.IX Item "v1.42, 22 May 1999"
2096Added notes about tests, sprintf/printf, and epoch offsets.
2097.IP "v1.41, 19 May 1999" 4
2098.IX Item "v1.41, 19 May 1999"
2099Lots more little changes to formatting and content.
2100.Sp
2101Added a bunch of \f(CW$^O\fR and related values
2102for various platforms; fixed mail and web addresses, and added
2103and changed miscellaneous notes. (Peter Prymmer)
2104.IP "v1.40, 11 April 1999" 4
2105.IX Item "v1.40, 11 April 1999"
2106Miscellaneous changes.
2107.IP "v1.39, 11 February 1999" 4
2108.IX Item "v1.39, 11 February 1999"
2109Changes from Jarkko and \s-1EMX\s0 \s-1URL\s0 fixes Michael Schwern. Additional
2110note about newlines added.
2111.IP "v1.38, 31 December 1998" 4
2112.IX Item "v1.38, 31 December 1998"
2113More changes from Jarkko.
2114.IP "v1.37, 19 December 1998" 4
2115.IX Item "v1.37, 19 December 1998"
2116More minor changes. Merge two separate version 1.35 documents.
2117.IP "v1.36, 9 September 1998" 4
2118.IX Item "v1.36, 9 September 1998"
2119Updated for Stratus \s-1VOS\s0. Also known as version 1.35.
2120.IP "v1.35, 13 August 1998" 4
2121.IX Item "v1.35, 13 August 1998"
2122Integrate more minor changes, plus addition of new sections under
2123\&\*(L"\s-1ISSUES\s0\*(R": \*(L"Numbers endianness and Width\*(R",
2124\&\*(L"Character sets and character encoding\*(R",
2125\&\*(L"Internationalisation\*(R".
2126.IP "v1.33, 06 August 1998" 4
2127.IX Item "v1.33, 06 August 1998"
2128Integrate more minor changes.
2129.IP "v1.32, 05 August 1998" 4
2130.IX Item "v1.32, 05 August 1998"
2131Integrate more minor changes.
2132.IP "v1.30, 03 August 1998" 4
2133.IX Item "v1.30, 03 August 1998"
2134Major update for \s-1RISC\s0 \s-1OS\s0, other minor changes.
2135.IP "v1.23, 10 July 1998" 4
2136.IX Item "v1.23, 10 July 1998"
2137First public release with perl5.005.
2138.SH "Supported Platforms"
2139.IX Header "Supported Platforms"
2140As of June 2002 (the Perl release 5.8.0), the following platforms are
2141able to build Perl from the standard source code distribution
2142available at http://www.cpan.org/src/index.html
2143.PP
2144.Vb 36
2145\& AIX
2146\& BeOS
2147\& Cygwin
2148\& DG/UX
2149\& DOS DJGPP 1)
2150\& DYNIX/ptx
2151\& EPOC R5
2152\& FreeBSD
2153\& HP-UX
2154\& IRIX
2155\& Linux
2156\& Mac OS Classic
2157\& Mac OS X (Darwin)
2158\& MPE/iX
2159\& NetBSD
2160\& NetWare
2161\& NonStop-UX
2162\& ReliantUNIX (SINIX)
2163\& OpenBSD
2164\& OpenVMS (VMS)
2165\& OS/2
2166\& PowerUX
2167\& POSIX-BC (BS2000)
2168\& QNX
2169\& Solaris
2170\& SunOS 4
2171\& SUPER-UX
2172\& Tru64 UNIX (DEC OSF/1, Digital UNIX)
2173\& UNICOS
2174\& UNICOS/mk
2175\& UTS
2176\& VOS
2177\& Win95/98/ME/2K/XP 2)
2178\& WinCE
2179\& z/OS (OS/390)
2180\& VM/ESA
2181.Ve
2182.PP
2183.Vb 2
2184\& 1) in DOS mode either the DOS or OS/2 ports can be used
2185\& 2) compilers: Borland, MinGW (GCC), VC6
2186.Ve
2187.PP
2188The following platforms worked with the previous releases (5.6 and
21895.7), but we did not manage either to fix or to test these in time
2190for the 5.8.0 release. There is a very good chance that many of these
2191will work fine with the 5.8.0.
2192.PP
2193.Vb 10
2194\& BSD/OS
2195\& DomainOS
2196\& Hurd
2197\& LynxOS
2198\& MachTen
2199\& PowerMAX
2200\& SCO SV
2201\& SVR4
2202\& Unixware
2203\& Windows 3.1
2204.Ve
2205.PP
2206Known to be broken for 5.8.0 (but 5.6.1 and 5.7.2 can be used):
2207.PP
2208.Vb 1
2209\& AmigaOS
2210.Ve
2211.PP
2212The following platforms have been known to build Perl from source in
2213the past (5.005_03 and earlier), but we haven't been able to verify
2214their status for the current release, either because the
2215hardware/software platforms are rare or because we don't have an
2216active champion on these platforms\*(--or both. They used to work,
2217though, so go ahead and try compiling them, and let perlbug@perl.org
2218of any trouble.
2219.PP
2220.Vb 30
2221\& 3b1
2222\& A/UX
2223\& ConvexOS
2224\& CX/UX
2225\& DC/OSx
2226\& DDE SMES
2227\& DOS EMX
2228\& Dynix
2229\& EP/IX
2230\& ESIX
2231\& FPS
2232\& GENIX
2233\& Greenhills
2234\& ISC
2235\& MachTen 68k
2236\& MiNT
2237\& MPC
2238\& NEWS-OS
2239\& NextSTEP
2240\& OpenSTEP
2241\& Opus
2242\& Plan 9
2243\& RISC/os
2244\& SCO ODT/OSR
2245\& Stellar
2246\& SVR2
2247\& TI1500
2248\& TitanOS
2249\& Ultrix
2250\& Unisys Dynix
2251.Ve
2252.PP
2253The following platforms have their own source code distributions and
2254binaries available via http://www.cpan.org/ports/
2255.PP
2256.Vb 1
2257\& Perl release
2258.Ve
2259.PP
2260.Vb 2
2261\& OS/400 5.005_02
2262\& Tandem Guardian 5.004
2263.Ve
2264.PP
2265The following platforms have only binaries available via
2266http://www.cpan.org/ports/index.html :
2267.PP
2268.Vb 1
2269\& Perl release
2270.Ve
2271.PP
2272.Vb 3
2273\& Acorn RISCOS 5.005_02
2274\& AOS 5.002
2275\& LynxOS 5.004_02
2276.Ve
2277.PP
2278Although we do suggest that you always build your own Perl from
2279the source code, both for maximal configurability and for security,
2280in case you are in a hurry you can check
2281http://www.cpan.org/ports/index.html for binary distributions.
2282.SH "SEE ALSO"
2283.IX Header "SEE ALSO"
2284perlaix, perlamiga, perlapollo, perlbeos, perlbs2000,
2285perlce, perlcygwin, perldgux, perldos, perlepoc,
2286perlebcdic, perlfreebsd, perlhurd, perlhpux, perlirix,
2287perlmachten, perlmacos, perlmint, perlmpeix,
2288perlnetware, perlos2, perlos390, perlplan9, perlqnx,
2289perlsolaris, perltru64, perlunicode, perlvmesa,
2290perlvms, perlvos, perlwin32, and Win32.
2291.SH "AUTHORS / CONTRIBUTORS"
2292.IX Header "AUTHORS / CONTRIBUTORS"
2293Abigail <abigail@foad.org>,
2294Charles Bailey <bailey@newman.upenn.edu>,
2295Graham Barr <gbarr@pobox.com>,
2296Tom Christiansen <tchrist@perl.com>,
2297Nicholas Clark <nick@ccl4.org>,
2298Thomas Dorner <Thomas.Dorner@start.de>,
2299Andy Dougherty <doughera@lafayette.edu>,
2300Dominic Dunlop <domo@computer.org>,
2301Neale Ferguson <neale@vma.tabnsw.com.au>,
2302David J. Fiander <davidf@mks.com>,
2303Paul Green <Paul_Green@stratus.com>,
2304M.J.T. Guy <mjtg@cam.ac.uk>,
2305Jarkko Hietaniemi <jhi@iki.fi>,
2306Luther Huffman <lutherh@stratcom.com>,
2307Nick Ing-Simmons <nick@ing\-simmons.net>,
2308Andreas J. Ko\*:nig <a.koenig@mind.de>,
2309Markus Laker <mlaker@contax.co.uk>,
2310Andrew M. Langmead <aml@world.std.com>,
2311Larry Moore <ljmoore@freespace.net>,
2312Paul Moore <Paul.Moore@uk.origin\-it.com>,
2313Chris Nandor <pudge@pobox.com>,
2314Matthias Neeracher <neeracher@mac.com>,
2315Philip Newton <pne@cpan.org>,
2316Gary Ng <71564.1743@CompuServe.COM>,
2317Tom Phoenix <rootbeer@teleport.com>,
2318Andre\*' Pirard <A.Pirard@ulg.ac.be>,
2319Peter Prymmer <pvhp@forte.com>,
2320Hugo van der Sanden <hv@crypt0.demon.co.uk>,
2321Gurusamy Sarathy <gsar@activestate.com>,
2322Paul J. Schinder <schinder@pobox.com>,
2323Michael G Schwern <schwern@pobox.com>,
2324Dan Sugalski <dan@sidhe.org>,
2325Nathan Torkington <gnat@frii.com>.