Commit | Line | Data |
---|---|---|
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 "POSIX 3" | |
132 | .TH POSIX 3 "2002-06-01" "perl v5.8.0" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | POSIX \- Perl interface to IEEE Std 1003.1 | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 3 | |
138 | \& use POSIX; | |
139 | \& use POSIX qw(setsid); | |
140 | \& use POSIX qw(:errno_h :fcntl_h); | |
141 | .Ve | |
142 | .PP | |
143 | .Vb 1 | |
144 | \& printf "EINTR is %d\en", EINTR; | |
145 | .Ve | |
146 | .PP | |
147 | .Vb 1 | |
148 | \& $sess_id = POSIX::setsid(); | |
149 | .Ve | |
150 | .PP | |
151 | .Vb 2 | |
152 | \& $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644); | |
153 | \& # note: that's a filedescriptor, *NOT* a filehandle | |
154 | .Ve | |
155 | .SH "DESCRIPTION" | |
156 | .IX Header "DESCRIPTION" | |
157 | The \s-1POSIX\s0 module permits you to access all (or nearly all) the standard | |
158 | \&\s-1POSIX\s0 1003.1 identifiers. Many of these identifiers have been given Perl-ish | |
159 | interfaces. Things which are \f(CW\*(C`#defines\*(C'\fR in C, like \s-1EINTR\s0 or O_NDELAY, are | |
160 | automatically exported into your namespace. All functions are only exported | |
161 | if you ask for them explicitly. Most likely people will prefer to use the | |
162 | fully-qualified function names. | |
163 | .PP | |
164 | This document gives a condensed list of the features available in the \s-1POSIX\s0 | |
165 | module. Consult your operating system's manpages for general information on | |
166 | most features. Consult perlfunc for functions which are noted as being | |
167 | identical to Perl's builtin functions. | |
168 | .PP | |
169 | The first section describes \s-1POSIX\s0 functions from the 1003.1 specification. | |
170 | The second section describes some classes for signal objects, \s-1TTY\s0 objects, | |
171 | and other miscellaneous objects. The remaining sections list various | |
172 | constants and macros in an organization which roughly follows \s-1IEEE\s0 Std | |
173 | 1003.1b\-1993. | |
174 | .SH "NOTE" | |
175 | .IX Header "NOTE" | |
176 | The \s-1POSIX\s0 module is probably the most complex Perl module supplied with | |
177 | the standard distribution. It incorporates autoloading, namespace games, | |
178 | and dynamic loading of code that's in Perl, C, or both. It's a great | |
179 | source of wisdom. | |
180 | .SH "CAVEATS" | |
181 | .IX Header "CAVEATS" | |
182 | A few functions are not implemented because they are C specific. If you | |
183 | attempt to call these, they will print a message telling you that they | |
184 | aren't implemented, and suggest using the Perl equivalent should one | |
185 | exist. For example, trying to access the \fIsetjmp()\fR call will elicit the | |
186 | message \*(L"\fIsetjmp()\fR is C\-specific: use eval {} instead\*(R". | |
187 | .PP | |
188 | Furthermore, some evil vendors will claim 1003.1 compliance, but in fact | |
189 | are not so: they will not pass the \s-1PCTS\s0 (\s-1POSIX\s0 Compliance Test Suites). | |
190 | For example, one vendor may not define \s-1EDEADLK\s0, or the semantics of the | |
191 | errno values set by \fIopen\fR\|(2) might not be quite right. Perl does not | |
192 | attempt to verify \s-1POSIX\s0 compliance. That means you can currently | |
193 | successfully say \*(L"use \s-1POSIX\s0\*(R", and then later in your program you find | |
194 | that your vendor has been lax and there's no usable \s-1ICANON\s0 macro after | |
195 | all. This could be construed to be a bug. | |
196 | .SH "FUNCTIONS" | |
197 | .IX Header "FUNCTIONS" | |
198 | .IP "_exit" 8 | |
199 | .IX Item "_exit" | |
200 | This is identical to the C function \f(CW\*(C`_exit()\*(C'\fR. It exits the program | |
201 | immediately which means among other things buffered I/O is \fBnot\fR flushed. | |
202 | .IP "abort" 8 | |
203 | .IX Item "abort" | |
204 | This is identical to the C function \f(CW\*(C`abort()\*(C'\fR. It terminates the | |
205 | process with a \f(CW\*(C`SIGABRT\*(C'\fR signal unless caught by a signal handler or | |
206 | if the handler does not return normally (it e.g. does a \f(CW\*(C`longjmp\*(C'\fR). | |
207 | .IP "abs" 8 | |
208 | .IX Item "abs" | |
209 | This is identical to Perl's builtin \f(CW\*(C`abs()\*(C'\fR function, returning | |
210 | the absolute value of its numerical argument. | |
211 | .IP "access" 8 | |
212 | .IX Item "access" | |
213 | Determines the accessibility of a file. | |
214 | .Sp | |
215 | .Vb 3 | |
216 | \& if( POSIX::access( "/", &POSIX::R_OK ) ){ | |
217 | \& print "have read permission\en"; | |
218 | \& } | |
219 | .Ve | |
220 | .Sp | |
221 | Returns \f(CW\*(C`undef\*(C'\fR on failure. Note: do not use \f(CW\*(C`access()\*(C'\fR for | |
222 | security purposes. Between the \f(CW\*(C`access()\*(C'\fR call and the operation | |
223 | you are preparing for the permissions might change: a classic | |
224 | \&\fIrace condition\fR. | |
225 | .IP "acos" 8 | |
226 | .IX Item "acos" | |
227 | This is identical to the C function \f(CW\*(C`acos()\*(C'\fR, returning | |
228 | the arcus cosine of its numerical argument. See also Math::Trig. | |
229 | .IP "alarm" 8 | |
230 | .IX Item "alarm" | |
231 | This is identical to Perl's builtin \f(CW\*(C`alarm()\*(C'\fR function, | |
232 | either for arming or disarming the \f(CW\*(C`SIGARLM\*(C'\fR timer. | |
233 | .IP "asctime" 8 | |
234 | .IX Item "asctime" | |
235 | This is identical to the C function \f(CW\*(C`asctime()\*(C'\fR. It returns | |
236 | a string of the form | |
237 | .Sp | |
238 | .Vb 1 | |
239 | \& "Fri Jun 2 18:22:13 2000\en\e0" | |
240 | .Ve | |
241 | .Sp | |
242 | and it is called thusly | |
243 | .Sp | |
244 | .Vb 2 | |
245 | \& $asctime = asctime($sec, $min, $hour, $mday, $mon, $year, | |
246 | \& $wday, $yday, $isdst); | |
247 | .Ve | |
248 | .Sp | |
249 | The \f(CW$mon\fR is zero\-based: January equals \f(CW0\fR. The \f(CW$year\fR is | |
250 | 1900\-based: 2001 equals \f(CW101\fR. The \f(CW$wday\fR, \f(CW$yday\fR, and \f(CW$isdst\fR | |
251 | default to zero (and the first two are usually ignored anyway). | |
252 | .IP "asin" 8 | |
253 | .IX Item "asin" | |
254 | This is identical to the C function \f(CW\*(C`asin()\*(C'\fR, returning | |
255 | the arcus sine of its numerical argument. See also Math::Trig. | |
256 | .IP "assert" 8 | |
257 | .IX Item "assert" | |
258 | Unimplemented, but you can use \*(L"die\*(R" in perlfunc and the Carp module | |
259 | to achieve similar things. | |
260 | .IP "atan" 8 | |
261 | .IX Item "atan" | |
262 | This is identical to the C function \f(CW\*(C`atan()\*(C'\fR, returning the | |
263 | arcus tangent of its numerical argument. See also Math::Trig. | |
264 | .IP "atan2" 8 | |
265 | .IX Item "atan2" | |
266 | This is identical to Perl's builtin \f(CW\*(C`atan2()\*(C'\fR function, returning | |
267 | the arcus tangent defined by its two numerical arguments, the \fIy\fR | |
268 | coordinate and the \fIx\fR coordinate. See also Math::Trig. | |
269 | .IP "atexit" 8 | |
270 | .IX Item "atexit" | |
271 | \&\fIatexit()\fR is C\-specific: use \f(CW\*(C`END {}\*(C'\fR instead, see perlsub. | |
272 | .IP "atof" 8 | |
273 | .IX Item "atof" | |
274 | \&\fIatof()\fR is C\-specific. Perl converts strings to numbers transparently. | |
275 | If you need to force a scalar to a number, add a zero to it. | |
276 | .IP "atoi" 8 | |
277 | .IX Item "atoi" | |
278 | \&\fIatoi()\fR is C\-specific. Perl converts strings to numbers transparently. | |
279 | If you need to force a scalar to a number, add a zero to it. | |
280 | If you need to have just the integer part, see \*(L"int\*(R" in perlfunc. | |
281 | .IP "atol" 8 | |
282 | .IX Item "atol" | |
283 | \&\fIatol()\fR is C\-specific. Perl converts strings to numbers transparently. | |
284 | If you need to force a scalar to a number, add a zero to it. | |
285 | If you need to have just the integer part, see \*(L"int\*(R" in perlfunc. | |
286 | .IP "bsearch" 8 | |
287 | .IX Item "bsearch" | |
288 | \&\fIbsearch()\fR not supplied. For doing binary search on wordlists, | |
289 | see Search::Dict. | |
290 | .IP "calloc" 8 | |
291 | .IX Item "calloc" | |
292 | \&\fIcalloc()\fR is C\-specific. Perl does memory management transparently. | |
293 | .IP "ceil" 8 | |
294 | .IX Item "ceil" | |
295 | This is identical to the C function \f(CW\*(C`ceil()\*(C'\fR, returning the smallest | |
296 | integer value greater than or equal to the given numerical argument. | |
297 | .IP "chdir" 8 | |
298 | .IX Item "chdir" | |
299 | This is identical to Perl's builtin \f(CW\*(C`chdir()\*(C'\fR function, allowing | |
300 | one to change the working (default) directory, see \*(L"chdir\*(R" in perlfunc. | |
301 | .IP "chmod" 8 | |
302 | .IX Item "chmod" | |
303 | This is identical to Perl's builtin \f(CW\*(C`chmod()\*(C'\fR function, allowing | |
304 | one to change file and directory permissions, see \*(L"chmod\*(R" in perlfunc. | |
305 | .IP "chown" 8 | |
306 | .IX Item "chown" | |
307 | This is identical to Perl's builtin \f(CW\*(C`chown()\*(C'\fR function, allowing one | |
308 | to change file and directory owners and groups, see \*(L"chown\*(R" in perlfunc. | |
309 | .IP "clearerr" 8 | |
310 | .IX Item "clearerr" | |
311 | Use the method \f(CW\*(C`IO::Handle::clearerr()\*(C'\fR instead, to reset the error | |
312 | state (if any) and \s-1EOF\s0 state (if any) of the given stream. | |
313 | .IP "clock" 8 | |
314 | .IX Item "clock" | |
315 | This is identical to the C function \f(CW\*(C`clock()\*(C'\fR, returning the | |
316 | amount of spent processor time in microseconds. | |
317 | .IP "close" 8 | |
318 | .IX Item "close" | |
319 | Close the file. This uses file descriptors such as those obtained by calling | |
320 | \&\f(CW\*(C`POSIX::open\*(C'\fR. | |
321 | .Sp | |
322 | .Vb 2 | |
323 | \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY ); | |
324 | \& POSIX::close( $fd ); | |
325 | .Ve | |
326 | .Sp | |
327 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
328 | .Sp | |
329 | See also \*(L"close\*(R" in perlfunc. | |
330 | .IP "closedir" 8 | |
331 | .IX Item "closedir" | |
332 | This is identical to Perl's builtin \f(CW\*(C`closedir()\*(C'\fR function for closing | |
333 | a directory handle, see \*(L"closedir\*(R" in perlfunc. | |
334 | .IP "cos" 8 | |
335 | .IX Item "cos" | |
336 | This is identical to Perl's builtin \f(CW\*(C`cos()\*(C'\fR function, for returning | |
337 | the cosine of its numerical argument, see \*(L"cos\*(R" in perlfunc. | |
338 | See also Math::Trig. | |
339 | .IP "cosh" 8 | |
340 | .IX Item "cosh" | |
341 | This is identical to the C function \f(CW\*(C`cosh()\*(C'\fR, for returning | |
342 | the hyperbolic cosine of its numeric argument. See also Math::Trig. | |
343 | .IP "creat" 8 | |
344 | .IX Item "creat" | |
345 | Create a new file. This returns a file descriptor like the ones returned by | |
346 | \&\f(CW\*(C`POSIX::open\*(C'\fR. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file. | |
347 | .Sp | |
348 | .Vb 2 | |
349 | \& $fd = POSIX::creat( "foo", 0611 ); | |
350 | \& POSIX::close( $fd ); | |
351 | .Ve | |
352 | .Sp | |
353 | See also \*(L"sysopen\*(R" in perlfunc and its \f(CW\*(C`O_CREAT\*(C'\fR flag. | |
354 | .IP "ctermid" 8 | |
355 | .IX Item "ctermid" | |
356 | Generates the path name for the controlling terminal. | |
357 | .Sp | |
358 | .Vb 1 | |
359 | \& $path = POSIX::ctermid(); | |
360 | .Ve | |
361 | .IP "ctime" 8 | |
362 | .IX Item "ctime" | |
363 | This is identical to the C function \f(CW\*(C`ctime()\*(C'\fR and equivalent | |
364 | to \f(CW\*(C`asctime(localtime(...))\*(C'\fR, see \*(L"asctime\*(R" and \*(L"localtime\*(R". | |
365 | .IP "cuserid" 8 | |
366 | .IX Item "cuserid" | |
367 | Get the login name of the owner of the current process. | |
368 | .Sp | |
369 | .Vb 1 | |
370 | \& $name = POSIX::cuserid(); | |
371 | .Ve | |
372 | .IP "difftime" 8 | |
373 | .IX Item "difftime" | |
374 | This is identical to the C function \f(CW\*(C`difftime()\*(C'\fR, for returning | |
375 | the time difference (in seconds) between two times (as returned | |
376 | by \f(CW\*(C`time()\*(C'\fR), see \*(L"time\*(R". | |
377 | .IP "div" 8 | |
378 | .IX Item "div" | |
379 | \&\fIdiv()\fR is C\-specific, use \*(L"int\*(R" in perlfunc on the usual \f(CW\*(C`/\*(C'\fR division and | |
380 | the modulus \f(CW\*(C`%\*(C'\fR. | |
381 | .IP "dup" 8 | |
382 | .IX Item "dup" | |
383 | This is similar to the C function \f(CW\*(C`dup()\*(C'\fR, for duplicating a file | |
384 | descriptor. | |
385 | .Sp | |
386 | This uses file descriptors such as those obtained by calling | |
387 | \&\f(CW\*(C`POSIX::open\*(C'\fR. | |
388 | .Sp | |
389 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
390 | .IP "dup2" 8 | |
391 | .IX Item "dup2" | |
392 | This is similar to the C function \f(CW\*(C`dup2()\*(C'\fR, for duplicating a file | |
393 | descriptor to an another known file descriptor. | |
394 | .Sp | |
395 | This uses file descriptors such as those obtained by calling | |
396 | \&\f(CW\*(C`POSIX::open\*(C'\fR. | |
397 | .Sp | |
398 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
399 | .IP "errno" 8 | |
400 | .IX Item "errno" | |
401 | Returns the value of errno. | |
402 | .Sp | |
403 | .Vb 1 | |
404 | \& $errno = POSIX::errno(); | |
405 | .Ve | |
406 | .Sp | |
407 | This identical to the numerical values of the \f(CW$!\fR, see \*(L"$ERRNO\*(R" in perlvar. | |
408 | .IP "execl" 8 | |
409 | .IX Item "execl" | |
410 | \&\fIexecl()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
411 | .IP "execle" 8 | |
412 | .IX Item "execle" | |
413 | \&\fIexecle()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
414 | .IP "execlp" 8 | |
415 | .IX Item "execlp" | |
416 | \&\fIexeclp()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
417 | .IP "execv" 8 | |
418 | .IX Item "execv" | |
419 | \&\fIexecv()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
420 | .IP "execve" 8 | |
421 | .IX Item "execve" | |
422 | \&\fIexecve()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
423 | .IP "execvp" 8 | |
424 | .IX Item "execvp" | |
425 | \&\fIexecvp()\fR is C\-specific, see \*(L"exec\*(R" in perlfunc. | |
426 | .IP "exit" 8 | |
427 | .IX Item "exit" | |
428 | This is identical to Perl's builtin \f(CW\*(C`exit()\*(C'\fR function for exiting the | |
429 | program, see \*(L"exit\*(R" in perlfunc. | |
430 | .IP "exp" 8 | |
431 | .IX Item "exp" | |
432 | This is identical to Perl's builtin \f(CW\*(C`exp()\*(C'\fR function for | |
433 | returning the exponent (\fIe\fR\-based) of the numerical argument, | |
434 | see \*(L"exp\*(R" in perlfunc. | |
435 | .IP "fabs" 8 | |
436 | .IX Item "fabs" | |
437 | This is identical to Perl's builtin \f(CW\*(C`abs()\*(C'\fR function for returning | |
438 | the absolute value of the numerical argument, see \*(L"abs\*(R" in perlfunc. | |
439 | .IP "fclose" 8 | |
440 | .IX Item "fclose" | |
441 | Use method \f(CW\*(C`IO::Handle::close()\*(C'\fR instead, or see \*(L"close\*(R" in perlfunc. | |
442 | .IP "fcntl" 8 | |
443 | .IX Item "fcntl" | |
444 | This is identical to Perl's builtin \f(CW\*(C`fcntl()\*(C'\fR function, | |
445 | see \*(L"fcntl\*(R" in perlfunc. | |
446 | .IP "fdopen" 8 | |
447 | .IX Item "fdopen" | |
448 | Use method \f(CW\*(C`IO::Handle::new_from_fd()\*(C'\fR instead, or see \*(L"open\*(R" in perlfunc. | |
449 | .IP "feof" 8 | |
450 | .IX Item "feof" | |
451 | Use method \f(CW\*(C`IO::Handle::eof()\*(C'\fR instead, or see \*(L"eof\*(R" in perlfunc. | |
452 | .IP "ferror" 8 | |
453 | .IX Item "ferror" | |
454 | Use method \f(CW\*(C`IO::Handle::error()\*(C'\fR instead. | |
455 | .IP "fflush" 8 | |
456 | .IX Item "fflush" | |
457 | Use method \f(CW\*(C`IO::Handle::flush()\*(C'\fR instead. | |
458 | See also \*(L"$OUTPUT_AUTOFLUSH\*(R" in perlvar. | |
459 | .IP "fgetc" 8 | |
460 | .IX Item "fgetc" | |
461 | Use method \f(CW\*(C`IO::Handle::getc()\*(C'\fR instead, or see \*(L"read\*(R" in perlfunc. | |
462 | .IP "fgetpos" 8 | |
463 | .IX Item "fgetpos" | |
464 | Use method \f(CW\*(C`IO::Seekable::getpos()\*(C'\fR instead, or see \*(L"seek\*(R" in L. | |
465 | .IP "fgets" 8 | |
466 | .IX Item "fgets" | |
467 | Use method \f(CW\*(C`IO::Handle::gets()\*(C'\fR instead. Similar to <>, also known | |
468 | as \*(L"readline\*(R" in perlfunc. | |
469 | .IP "fileno" 8 | |
470 | .IX Item "fileno" | |
471 | Use method \f(CW\*(C`IO::Handle::fileno()\*(C'\fR instead, or see \*(L"fileno\*(R" in perlfunc. | |
472 | .IP "floor" 8 | |
473 | .IX Item "floor" | |
474 | This is identical to the C function \f(CW\*(C`floor()\*(C'\fR, returning the largest | |
475 | integer value less than or equal to the numerical argument. | |
476 | .IP "fmod" 8 | |
477 | .IX Item "fmod" | |
478 | This is identical to the C function \f(CW\*(C`fmod()\*(C'\fR. | |
479 | .Sp | |
480 | .Vb 1 | |
481 | \& $r = fmod($x, $y); | |
482 | .Ve | |
483 | .Sp | |
484 | It returns the remainder \f(CW\*(C`$r = $x \- $n*$y\*(C'\fR, where \f(CW\*(C`$n = trunc($x/$y)\*(C'\fR. | |
485 | The \f(CW$r\fR has the same sign as \f(CW$x\fR and magnitude (absolute value) | |
486 | less than the magnitude of \f(CW$y\fR. | |
487 | .IP "fopen" 8 | |
488 | .IX Item "fopen" | |
489 | Use method \f(CW\*(C`IO::File::open()\*(C'\fR instead, or see \*(L"open\*(R" in perlfunc. | |
490 | .IP "fork" 8 | |
491 | .IX Item "fork" | |
492 | This is identical to Perl's builtin \f(CW\*(C`fork()\*(C'\fR function | |
493 | for duplicating the current process, see \*(L"fork\*(R" in perlfunc | |
494 | and perlfork if you are in Windows. | |
495 | .IP "fpathconf" 8 | |
496 | .IX Item "fpathconf" | |
497 | Retrieves the value of a configurable limit on a file or directory. This | |
498 | uses file descriptors such as those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR. | |
499 | .Sp | |
500 | The following will determine the maximum length of the longest allowable | |
501 | pathname on the filesystem which holds \f(CW\*(C`/tmp/foo\*(C'\fR. | |
502 | .Sp | |
503 | .Vb 2 | |
504 | \& $fd = POSIX::open( "/tmp/foo", &POSIX::O_RDONLY ); | |
505 | \& $path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX ); | |
506 | .Ve | |
507 | .Sp | |
508 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
509 | .IP "fprintf" 8 | |
510 | .IX Item "fprintf" | |
511 | \&\fIfprintf()\fR is C\-specific, see \*(L"printf\*(R" in perlfunc instead. | |
512 | .IP "fputc" 8 | |
513 | .IX Item "fputc" | |
514 | \&\fIfputc()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
515 | .IP "fputs" 8 | |
516 | .IX Item "fputs" | |
517 | \&\fIfputs()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
518 | .IP "fread" 8 | |
519 | .IX Item "fread" | |
520 | \&\fIfread()\fR is C\-specific, see \*(L"read\*(R" in perlfunc instead. | |
521 | .IP "free" 8 | |
522 | .IX Item "free" | |
523 | \&\fIfree()\fR is C\-specific. Perl does memory management transparently. | |
524 | .IP "freopen" 8 | |
525 | .IX Item "freopen" | |
526 | \&\fIfreopen()\fR is C\-specific, see \*(L"open\*(R" in perlfunc instead. | |
527 | .IP "frexp" 8 | |
528 | .IX Item "frexp" | |
529 | Return the mantissa and exponent of a floating-point number. | |
530 | .Sp | |
531 | .Vb 1 | |
532 | \& ($mantissa, $exponent) = POSIX::frexp( 1.234e56 ); | |
533 | .Ve | |
534 | .IP "fscanf" 8 | |
535 | .IX Item "fscanf" | |
536 | \&\fIfscanf()\fR is C\-specific, use <> and regular expressions instead. | |
537 | .IP "fseek" 8 | |
538 | .IX Item "fseek" | |
539 | Use method \f(CW\*(C`IO::Seekable::seek()\*(C'\fR instead, or see \*(L"seek\*(R" in perlfunc. | |
540 | .IP "fsetpos" 8 | |
541 | .IX Item "fsetpos" | |
542 | Use method \f(CW\*(C`IO::Seekable::setpos()\*(C'\fR instead, or seek \*(L"seek\*(R" in perlfunc. | |
543 | .IP "fstat" 8 | |
544 | .IX Item "fstat" | |
545 | Get file status. This uses file descriptors such as those obtained by | |
546 | calling \f(CW\*(C`POSIX::open\*(C'\fR. The data returned is identical to the data from | |
547 | Perl's builtin \f(CW\*(C`stat\*(C'\fR function. | |
548 | .Sp | |
549 | .Vb 2 | |
550 | \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY ); | |
551 | \& @stats = POSIX::fstat( $fd ); | |
552 | .Ve | |
553 | .IP "ftell" 8 | |
554 | .IX Item "ftell" | |
555 | Use method \f(CW\*(C`IO::Seekable::tell()\*(C'\fR instead, or see \*(L"tell\*(R" in perlfunc. | |
556 | .IP "fwrite" 8 | |
557 | .IX Item "fwrite" | |
558 | \&\fIfwrite()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
559 | .IP "getc" 8 | |
560 | .IX Item "getc" | |
561 | This is identical to Perl's builtin \f(CW\*(C`getc()\*(C'\fR function, | |
562 | see \*(L"getc\*(R" in perlfunc. | |
563 | .IP "getchar" 8 | |
564 | .IX Item "getchar" | |
565 | Returns one character from \s-1STDIN\s0. Identical to Perl's \f(CW\*(C`getc()\*(C'\fR, | |
566 | see \*(L"getc\*(R" in perlfunc. | |
567 | .IP "getcwd" 8 | |
568 | .IX Item "getcwd" | |
569 | Returns the name of the current working directory. | |
570 | See also Cwd. | |
571 | .IP "getegid" 8 | |
572 | .IX Item "getegid" | |
573 | Returns the effective group identifier. Similar to Perl' s builtin | |
574 | variable \f(CW$(\fR, see \*(L"$EGID\*(R" in perlvar. | |
575 | .IP "getenv" 8 | |
576 | .IX Item "getenv" | |
577 | Returns the value of the specified enironment variable. | |
578 | The same information is available through the \f(CW%ENV\fR array. | |
579 | .IP "geteuid" 8 | |
580 | .IX Item "geteuid" | |
581 | Returns the effective user identifier. Identical to Perl's builtin \f(CW$>\fR | |
582 | variable, see \*(L"$EUID\*(R" in perlvar. | |
583 | .IP "getgid" 8 | |
584 | .IX Item "getgid" | |
585 | Returns the user's real group identifier. Similar to Perl's builtin | |
586 | variable \f(CW$)\fR, see \*(L"$GID\*(R" in perlvar. | |
587 | .IP "getgrgid" 8 | |
588 | .IX Item "getgrgid" | |
589 | This is identical to Perl's builtin \f(CW\*(C`getgrgid()\*(C'\fR function for | |
590 | returning group entries by group identifiers, see | |
591 | \&\*(L"getgrgid\*(R" in perlfunc. | |
592 | .IP "getgrnam" 8 | |
593 | .IX Item "getgrnam" | |
594 | This is identical to Perl's builtin \f(CW\*(C`getgrnam()\*(C'\fR function for | |
595 | returning group entries by group names, see \*(L"getgrnam\*(R" in perlfunc. | |
596 | .IP "getgroups" 8 | |
597 | .IX Item "getgroups" | |
598 | Returns the ids of the user's supplementary groups. Similar to Perl's | |
599 | builtin variable \f(CW$)\fR, see \*(L"$GID\*(R" in perlvar. | |
600 | .IP "getlogin" 8 | |
601 | .IX Item "getlogin" | |
602 | This is identical to Perl's builtin \f(CW\*(C`getlogin()\*(C'\fR function for | |
603 | returning the user name associated with the current session, see | |
604 | \&\*(L"getlogin\*(R" in perlfunc. | |
605 | .IP "getpgrp" 8 | |
606 | .IX Item "getpgrp" | |
607 | This is identical to Perl's builtin \f(CW\*(C`getpgrp()\*(C'\fR function for | |
608 | returning the prcess group identifier of the current process, see | |
609 | \&\*(L"getpgrp\*(R" in perlfunc. | |
610 | .IP "getpid" 8 | |
611 | .IX Item "getpid" | |
612 | Returns the process identifier. Identical to Perl's builtin | |
613 | variable \f(CW$$\fR, see \*(L"$PID\*(R" in perlvar. | |
614 | .IP "getppid" 8 | |
615 | .IX Item "getppid" | |
616 | This is identical to Perl's builtin \f(CW\*(C`getppid()\*(C'\fR function for | |
617 | returning the process identifier of the parent process of the current | |
618 | process , see \*(L"getppid\*(R" in perlfunc. | |
619 | .IP "getpwnam" 8 | |
620 | .IX Item "getpwnam" | |
621 | This is identical to Perl's builtin \f(CW\*(C`getpwnam()\*(C'\fR function for | |
622 | returning user entries by user names, see \*(L"getpwnam\*(R" in perlfunc. | |
623 | .IP "getpwuid" 8 | |
624 | .IX Item "getpwuid" | |
625 | This is identical to Perl's builtin \f(CW\*(C`getpwuid()\*(C'\fR function for | |
626 | returning user entries by user identifiers, see \*(L"getpwuid\*(R" in perlfunc. | |
627 | .IP "gets" 8 | |
628 | .IX Item "gets" | |
629 | Returns one line from \f(CW\*(C`STDIN\*(C'\fR, similar to <>, also known | |
630 | as the \f(CW\*(C`readline()\*(C'\fR function, see \*(L"readline\*(R" in perlfunc. | |
631 | .Sp | |
632 | \&\fB\s-1NOTE\s0\fR: if you have C programs that still use \f(CW\*(C`gets()\*(C'\fR, be very | |
633 | afraid. The \f(CW\*(C`gets()\*(C'\fR function is a source of endless grief because | |
634 | it has no buffer overrun checks. It should \fBnever\fR be used. The | |
635 | \&\f(CW\*(C`fgets()\*(C'\fR function should be preferred instead. | |
636 | .IP "getuid" 8 | |
637 | .IX Item "getuid" | |
638 | Returns the user's identifier. Identical to Perl's builtin \f(CW$<\fR variable, | |
639 | see \*(L"$UID\*(R" in perlvar. | |
640 | .IP "gmtime" 8 | |
641 | .IX Item "gmtime" | |
642 | This is identical to Perl's builtin \f(CW\*(C`gmtime()\*(C'\fR function for | |
643 | converting seconds since the epoch to a date in Greenwich Mean Time, | |
644 | see \*(L"gmtime\*(R" in perlfunc. | |
645 | .IP "isalnum" 8 | |
646 | .IX Item "isalnum" | |
647 | This is identical to the C function, except that it can apply to a single | |
648 | character or to a whole string. Consider using regular expressions and the | |
649 | \&\f(CW\*(C`/[[:alnum:]]/\*(C'\fR construct instead, or possibly the \f(CW\*(C`/\ew/\*(C'\fR construct. | |
650 | .IP "isalpha" 8 | |
651 | .IX Item "isalpha" | |
652 | This is identical to the C function, except that it can apply to a single | |
653 | character or to a whole string. Consider using regular expressions and the | |
654 | \&\f(CW\*(C`/[[:alpha:]]/\*(C'\fR construct instead. | |
655 | .IP "isatty" 8 | |
656 | .IX Item "isatty" | |
657 | Returns a boolean indicating whether the specified filehandle is connected | |
658 | to a tty. Similar to the \f(CW\*(C`\-t\*(C'\fR operator, see \*(L"\-X\*(R" in perlfunc. | |
659 | .IP "iscntrl" 8 | |
660 | .IX Item "iscntrl" | |
661 | This is identical to the C function, except that it can apply to a single | |
662 | character or to a whole string. Consider using regular expressions and the | |
663 | \&\f(CW\*(C`/[[:cntrl:]]/\*(C'\fR construct instead. | |
664 | .IP "isdigit" 8 | |
665 | .IX Item "isdigit" | |
666 | This is identical to the C function, except that it can apply to a single | |
667 | character or to a whole string. Consider using regular expressions and the | |
668 | \&\f(CW\*(C`/[[:digit:]]/\*(C'\fR construct instead, or the \f(CW\*(C`/\ed/\*(C'\fR construct. | |
669 | .IP "isgraph" 8 | |
670 | .IX Item "isgraph" | |
671 | This is identical to the C function, except that it can apply to a single | |
672 | character or to a whole string. Consider using regular expressions and the | |
673 | \&\f(CW\*(C`/[[:graph:]]/\*(C'\fR construct instead. | |
674 | .IP "islower" 8 | |
675 | .IX Item "islower" | |
676 | This is identical to the C function, except that it can apply to a single | |
677 | character or to a whole string. Consider using regular expressions and the | |
678 | \&\f(CW\*(C`/[[:lower:]]/\*(C'\fR construct instead. Do \fBnot\fR use \f(CW\*(C`/[a\-z]/\*(C'\fR. | |
679 | .IP "isprint" 8 | |
680 | .IX Item "isprint" | |
681 | This is identical to the C function, except that it can apply to a single | |
682 | character or to a whole string. Consider using regular expressions and the | |
683 | \&\f(CW\*(C`/[[:print:]]/\*(C'\fR construct instead. | |
684 | .IP "ispunct" 8 | |
685 | .IX Item "ispunct" | |
686 | This is identical to the C function, except that it can apply to a single | |
687 | character or to a whole string. Consider using regular expressions and the | |
688 | \&\f(CW\*(C`/[[:punct:]]/\*(C'\fR construct instead. | |
689 | .IP "isspace" 8 | |
690 | .IX Item "isspace" | |
691 | This is identical to the C function, except that it can apply to a single | |
692 | character or to a whole string. Consider using regular expressions and the | |
693 | \&\f(CW\*(C`/[[:space:]]/\*(C'\fR construct instead, or the \f(CW\*(C`/\es/\*(C'\fR construct. | |
694 | (Note that \f(CW\*(C`/\es/\*(C'\fR and \f(CW\*(C`/[[:space:]]/\*(C'\fR are slightly different in that | |
695 | \&\f(CW\*(C`/[[:space:]]/\*(C'\fR can normally match a vertical tab, while \f(CW\*(C`/\es/\*(C'\fR does | |
696 | not.) | |
697 | .IP "isupper" 8 | |
698 | .IX Item "isupper" | |
699 | This is identical to the C function, except that it can apply to a single | |
700 | character or to a whole string. Consider using regular expressions and the | |
701 | \&\f(CW\*(C`/[[:upper:]]/\*(C'\fR construct instead. Do \fBnot\fR use \f(CW\*(C`/[A\-Z]/\*(C'\fR. | |
702 | .IP "isxdigit" 8 | |
703 | .IX Item "isxdigit" | |
704 | This is identical to the C function, except that it can apply to a single | |
705 | character or to a whole string. Consider using regular expressions and the | |
706 | \&\f(CW\*(C`/[[:xdigit:]]/\*(C'\fR construct instead, or simply \f(CW\*(C`/[0\-9a\-f]/i\*(C'\fR. | |
707 | .IP "kill" 8 | |
708 | .IX Item "kill" | |
709 | This is identical to Perl's builtin \f(CW\*(C`kill()\*(C'\fR function for sending | |
710 | signals to processes (often to terminate them), see \*(L"kill\*(R" in perlfunc. | |
711 | .IP "labs" 8 | |
712 | .IX Item "labs" | |
713 | (For returning absolute values of long integers.) | |
714 | \&\fIlabs()\fR is C\-specific, see \*(L"abs\*(R" in perlfunc instead. | |
715 | .IP "ldexp" 8 | |
716 | .IX Item "ldexp" | |
717 | This is identical to the C function \f(CW\*(C`ldexp()\*(C'\fR | |
718 | for multiplying floating point numbers with powers of two. | |
719 | .Sp | |
720 | .Vb 1 | |
721 | \& $x_quadrupled = POSIX::ldexp($x, 2); | |
722 | .Ve | |
723 | .IP "ldiv" 8 | |
724 | .IX Item "ldiv" | |
725 | (For computing dividends of long integers.) | |
726 | \&\fIldiv()\fR is C\-specific, use \f(CW\*(C`/\*(C'\fR and \f(CW\*(C`int()\*(C'\fR instead. | |
727 | .IP "link" 8 | |
728 | .IX Item "link" | |
729 | This is identical to Perl's builtin \f(CW\*(C`link()\*(C'\fR function | |
730 | for creating hard links into files, see \*(L"link\*(R" in perlfunc. | |
731 | .IP "localeconv" 8 | |
732 | .IX Item "localeconv" | |
733 | Get numeric formatting information. Returns a reference to a hash | |
734 | containing the current locale formatting values. | |
735 | .Sp | |
736 | Here is how to query the database for the \fBde\fR (Deutsch or German) locale. | |
737 | .Sp | |
738 | .Vb 21 | |
739 | \& $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" ); | |
740 | \& print "Locale = $loc\en"; | |
741 | \& $lconv = POSIX::localeconv(); | |
742 | \& print "decimal_point = ", $lconv->{decimal_point}, "\en"; | |
743 | \& print "thousands_sep = ", $lconv->{thousands_sep}, "\en"; | |
744 | \& print "grouping = ", $lconv->{grouping}, "\en"; | |
745 | \& print "int_curr_symbol = ", $lconv->{int_curr_symbol}, "\en"; | |
746 | \& print "currency_symbol = ", $lconv->{currency_symbol}, "\en"; | |
747 | \& print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\en"; | |
748 | \& print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\en"; | |
749 | \& print "mon_grouping = ", $lconv->{mon_grouping}, "\en"; | |
750 | \& print "positive_sign = ", $lconv->{positive_sign}, "\en"; | |
751 | \& print "negative_sign = ", $lconv->{negative_sign}, "\en"; | |
752 | \& print "int_frac_digits = ", $lconv->{int_frac_digits}, "\en"; | |
753 | \& print "frac_digits = ", $lconv->{frac_digits}, "\en"; | |
754 | \& print "p_cs_precedes = ", $lconv->{p_cs_precedes}, "\en"; | |
755 | \& print "p_sep_by_space = ", $lconv->{p_sep_by_space}, "\en"; | |
756 | \& print "n_cs_precedes = ", $lconv->{n_cs_precedes}, "\en"; | |
757 | \& print "n_sep_by_space = ", $lconv->{n_sep_by_space}, "\en"; | |
758 | \& print "p_sign_posn = ", $lconv->{p_sign_posn}, "\en"; | |
759 | \& print "n_sign_posn = ", $lconv->{n_sign_posn}, "\en"; | |
760 | .Ve | |
761 | .IP "localtime" 8 | |
762 | .IX Item "localtime" | |
763 | This is identical to Perl's builtin \f(CW\*(C`localtime()\*(C'\fR function for | |
764 | converting seconds since the epoch to a date see \*(L"localtime\*(R" in perlfunc. | |
765 | .IP "log" 8 | |
766 | .IX Item "log" | |
767 | This is identical to Perl's builtin \f(CW\*(C`log()\*(C'\fR function, | |
768 | returning the natural (\fIe\fR\-based) logarithm of the numerical argument, | |
769 | see \*(L"log\*(R" in perlfunc. | |
770 | .IP "log10" 8 | |
771 | .IX Item "log10" | |
772 | This is identical to the C function \f(CW\*(C`log10()\*(C'\fR, | |
773 | returning the 10\-base logarithm of the numerical argument. | |
774 | You can also use | |
775 | .Sp | |
776 | .Vb 1 | |
777 | \& sub log10 { log($_[0]) / log(10) } | |
778 | .Ve | |
779 | .Sp | |
780 | or | |
781 | .Sp | |
782 | .Vb 1 | |
783 | \& sub log10 { log($_[0]) / 2.30258509299405 } | |
784 | .Ve | |
785 | .Sp | |
786 | or | |
787 | .Sp | |
788 | .Vb 1 | |
789 | \& sub log10 { log($_[0]) * 0.434294481903252 } | |
790 | .Ve | |
791 | .IP "longjmp" 8 | |
792 | .IX Item "longjmp" | |
793 | \&\fIlongjmp()\fR is C\-specific: use \*(L"die\*(R" in perlfunc instead. | |
794 | .IP "lseek" 8 | |
795 | .IX Item "lseek" | |
796 | Move the file's read/write position. This uses file descriptors such as | |
797 | those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR. | |
798 | .Sp | |
799 | .Vb 2 | |
800 | \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY ); | |
801 | \& $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET ); | |
802 | .Ve | |
803 | .Sp | |
804 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
805 | .IP "malloc" 8 | |
806 | .IX Item "malloc" | |
807 | \&\fImalloc()\fR is C\-specific. Perl does memory management transparently. | |
808 | .IP "mblen" 8 | |
809 | .IX Item "mblen" | |
810 | This is identical to the C function \f(CW\*(C`mblen()\*(C'\fR. | |
811 | Perl does not have any support for the wide and multibyte | |
812 | characters of the C standards, so this might be a rather | |
813 | useless function. | |
814 | .IP "mbstowcs" 8 | |
815 | .IX Item "mbstowcs" | |
816 | This is identical to the C function \f(CW\*(C`mbstowcs()\*(C'\fR. | |
817 | Perl does not have any support for the wide and multibyte | |
818 | characters of the C standards, so this might be a rather | |
819 | useless function. | |
820 | .IP "mbtowc" 8 | |
821 | .IX Item "mbtowc" | |
822 | This is identical to the C function \f(CW\*(C`mbtowc()\*(C'\fR. | |
823 | Perl does not have any support for the wide and multibyte | |
824 | characters of the C standards, so this might be a rather | |
825 | useless function. | |
826 | .IP "memchr" 8 | |
827 | .IX Item "memchr" | |
828 | \&\fImemchr()\fR is C\-specific, see \*(L"index\*(R" in perlfunc instead. | |
829 | .IP "memcmp" 8 | |
830 | .IX Item "memcmp" | |
831 | \&\fImemcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop. | |
832 | .IP "memcpy" 8 | |
833 | .IX Item "memcpy" | |
834 | \&\fImemcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see \*(L"substr\*(R" in perlfunc. | |
835 | .IP "memmove" 8 | |
836 | .IX Item "memmove" | |
837 | \&\fImemmove()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see \*(L"substr\*(R" in perlfunc. | |
838 | .IP "memset" 8 | |
839 | .IX Item "memset" | |
840 | \&\fImemset()\fR is C\-specific, use \f(CW\*(C`x\*(C'\fR instead, see perlop. | |
841 | .IP "mkdir" 8 | |
842 | .IX Item "mkdir" | |
843 | This is identical to Perl's builtin \f(CW\*(C`mkdir()\*(C'\fR function | |
844 | for creating directories, see \*(L"mkdir\*(R" in perlfunc. | |
845 | .IP "mkfifo" 8 | |
846 | .IX Item "mkfifo" | |
847 | This is similar to the C function \f(CW\*(C`mkfifo()\*(C'\fR for creating | |
848 | \&\s-1FIFO\s0 special files. | |
849 | .Sp | |
850 | .Vb 1 | |
851 | \& if (mkfifo($path, $mode)) { .... | |
852 | .Ve | |
853 | .Sp | |
854 | Returns \f(CW\*(C`undef\*(C'\fR on failure. The \f(CW$mode\fR is similar to the | |
855 | mode of \f(CW\*(C`mkdir()\*(C'\fR, see \*(L"mkdir\*(R" in perlfunc. | |
856 | .IP "mktime" 8 | |
857 | .IX Item "mktime" | |
858 | Convert date/time info to a calendar time. | |
859 | .Sp | |
860 | Synopsis: | |
861 | .Sp | |
862 | .Vb 1 | |
863 | \& mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0) | |
864 | .Ve | |
865 | .Sp | |
866 | The month (\f(CW\*(C`mon\*(C'\fR), weekday (\f(CW\*(C`wday\*(C'\fR), and yearday (\f(CW\*(C`yday\*(C'\fR) begin at zero. | |
867 | I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The | |
868 | year (\f(CW\*(C`year\*(C'\fR) is given in years since 1900. I.e. The year 1995 is 95; the | |
869 | year 2001 is 101. Consult your system's \f(CW\*(C`mktime()\*(C'\fR manpage for details | |
870 | about these and the other arguments. | |
871 | .Sp | |
872 | Calendar time for December 12, 1995, at 10:30 am. | |
873 | .Sp | |
874 | .Vb 2 | |
875 | \& $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 ); | |
876 | \& print "Date = ", POSIX::ctime($time_t); | |
877 | .Ve | |
878 | .Sp | |
879 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
880 | .IP "modf" 8 | |
881 | .IX Item "modf" | |
882 | Return the integral and fractional parts of a floating-point number. | |
883 | .Sp | |
884 | .Vb 1 | |
885 | \& ($fractional, $integral) = POSIX::modf( 3.14 ); | |
886 | .Ve | |
887 | .IP "nice" 8 | |
888 | .IX Item "nice" | |
889 | This is similar to the C function \f(CW\*(C`nice()\*(C'\fR, for changing | |
890 | the scheduling preference of the current process. Positive | |
891 | arguments mean more polite process, negative values more | |
892 | needy process. Normal user processes can only be more polite. | |
893 | .Sp | |
894 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
895 | .IP "offsetof" 8 | |
896 | .IX Item "offsetof" | |
897 | \&\fIoffsetof()\fR is C\-specific, you probably want to see \*(L"pack\*(R" in perlfunc instead. | |
898 | .IP "open" 8 | |
899 | .IX Item "open" | |
900 | Open a file for reading for writing. This returns file descriptors, not | |
901 | Perl filehandles. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file. | |
902 | .Sp | |
903 | Open a file read-only with mode 0666. | |
904 | .Sp | |
905 | .Vb 1 | |
906 | \& $fd = POSIX::open( "foo" ); | |
907 | .Ve | |
908 | .Sp | |
909 | Open a file for read and write. | |
910 | .Sp | |
911 | .Vb 1 | |
912 | \& $fd = POSIX::open( "foo", &POSIX::O_RDWR ); | |
913 | .Ve | |
914 | .Sp | |
915 | Open a file for write, with truncation. | |
916 | .Sp | |
917 | .Vb 1 | |
918 | \& $fd = POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC ); | |
919 | .Ve | |
920 | .Sp | |
921 | Create a new file with mode 0640. Set up the file for writing. | |
922 | .Sp | |
923 | .Vb 1 | |
924 | \& $fd = POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640 ); | |
925 | .Ve | |
926 | .Sp | |
927 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
928 | .Sp | |
929 | See also \*(L"sysopen\*(R" in perlfunc. | |
930 | .IP "opendir" 8 | |
931 | .IX Item "opendir" | |
932 | Open a directory for reading. | |
933 | .Sp | |
934 | .Vb 3 | |
935 | \& $dir = POSIX::opendir( "/tmp" ); | |
936 | \& @files = POSIX::readdir( $dir ); | |
937 | \& POSIX::closedir( $dir ); | |
938 | .Ve | |
939 | .Sp | |
940 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
941 | .IP "pathconf" 8 | |
942 | .IX Item "pathconf" | |
943 | Retrieves the value of a configurable limit on a file or directory. | |
944 | .Sp | |
945 | The following will determine the maximum length of the longest allowable | |
946 | pathname on the filesystem which holds \f(CW\*(C`/tmp\*(C'\fR. | |
947 | .Sp | |
948 | .Vb 1 | |
949 | \& $path_max = POSIX::pathconf( "/tmp", &POSIX::_PC_PATH_MAX ); | |
950 | .Ve | |
951 | .Sp | |
952 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
953 | .IP "pause" 8 | |
954 | .IX Item "pause" | |
955 | This is similar to the C function \f(CW\*(C`pause()\*(C'\fR, which suspends | |
956 | the execution of the current process until a signal is received. | |
957 | .Sp | |
958 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
959 | .IP "perror" 8 | |
960 | .IX Item "perror" | |
961 | This is identical to the C function \f(CW\*(C`perror()\*(C'\fR, which outputs to the | |
962 | standard error stream the specified message followed by \*(L": \*(R" and the | |
963 | current error string. Use the \f(CW\*(C`warn()\*(C'\fR function and the \f(CW$!\fR | |
964 | variable instead, see \*(L"warn\*(R" in perlfunc and \*(L"$ERRNO\*(R" in perlvar. | |
965 | .IP "pipe" 8 | |
966 | .IX Item "pipe" | |
967 | Create an interprocess channel. This returns file descriptors like those | |
968 | returned by \f(CW\*(C`POSIX::open\*(C'\fR. | |
969 | .Sp | |
970 | .Vb 3 | |
971 | \& ($fd0, $fd1) = POSIX::pipe(); | |
972 | \& POSIX::write( $fd0, "hello", 5 ); | |
973 | \& POSIX::read( $fd1, $buf, 5 ); | |
974 | .Ve | |
975 | .Sp | |
976 | See also \*(L"pipe\*(R" in perlfunc. | |
977 | .IP "pow" 8 | |
978 | .IX Item "pow" | |
979 | Computes \f(CW$x\fR raised to the power \f(CW$exponent\fR. | |
980 | .Sp | |
981 | .Vb 1 | |
982 | \& $ret = POSIX::pow( $x, $exponent ); | |
983 | .Ve | |
984 | .Sp | |
985 | You can also use the \f(CW\*(C`**\*(C'\fR operator, see perlop. | |
986 | .IP "printf" 8 | |
987 | .IX Item "printf" | |
988 | Formats and prints the specified arguments to \s-1STDOUT\s0. | |
989 | See also \*(L"printf\*(R" in perlfunc. | |
990 | .IP "putc" 8 | |
991 | .IX Item "putc" | |
992 | \&\fIputc()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
993 | .IP "putchar" 8 | |
994 | .IX Item "putchar" | |
995 | \&\fIputchar()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
996 | .IP "puts" 8 | |
997 | .IX Item "puts" | |
998 | \&\fIputs()\fR is C\-specific, see \*(L"print\*(R" in perlfunc instead. | |
999 | .IP "qsort" 8 | |
1000 | .IX Item "qsort" | |
1001 | \&\fIqsort()\fR is C\-specific, see \*(L"sort\*(R" in perlfunc instead. | |
1002 | .IP "raise" 8 | |
1003 | .IX Item "raise" | |
1004 | Sends the specified signal to the current process. | |
1005 | See also \*(L"kill\*(R" in perlfunc and the \f(CW$$\fR in \*(L"$PID\*(R" in perlvar. | |
1006 | .IP "rand" 8 | |
1007 | .IX Item "rand" | |
1008 | \&\f(CW\*(C`rand()\*(C'\fR is non\-portable, see \*(L"rand\*(R" in perlfunc instead. | |
1009 | .IP "read" 8 | |
1010 | .IX Item "read" | |
1011 | Read from a file. This uses file descriptors such as those obtained by | |
1012 | calling \f(CW\*(C`POSIX::open\*(C'\fR. If the buffer \f(CW$buf\fR is not large enough for the | |
1013 | read then Perl will extend it to make room for the request. | |
1014 | .Sp | |
1015 | .Vb 2 | |
1016 | \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY ); | |
1017 | \& $bytes = POSIX::read( $fd, $buf, 3 ); | |
1018 | .Ve | |
1019 | .Sp | |
1020 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1021 | .Sp | |
1022 | See also \*(L"sysread\*(R" in perlfunc. | |
1023 | .IP "readdir" 8 | |
1024 | .IX Item "readdir" | |
1025 | This is identical to Perl's builtin \f(CW\*(C`readdir()\*(C'\fR function | |
1026 | for reading directory entries, see \*(L"readdir\*(R" in perlfunc. | |
1027 | .IP "realloc" 8 | |
1028 | .IX Item "realloc" | |
1029 | \&\fIrealloc()\fR is C\-specific. Perl does memory management transparently. | |
1030 | .IP "remove" 8 | |
1031 | .IX Item "remove" | |
1032 | This is identical to Perl's builtin \f(CW\*(C`unlink()\*(C'\fR function | |
1033 | for removing files, see \*(L"unlink\*(R" in perlfunc. | |
1034 | .IP "rename" 8 | |
1035 | .IX Item "rename" | |
1036 | This is identical to Perl's builtin \f(CW\*(C`rename()\*(C'\fR function | |
1037 | for renaming files, see \*(L"rename\*(R" in perlfunc. | |
1038 | .IP "rewind" 8 | |
1039 | .IX Item "rewind" | |
1040 | Seeks to the beginning of the file. | |
1041 | .IP "rewinddir" 8 | |
1042 | .IX Item "rewinddir" | |
1043 | This is identical to Perl's builtin \f(CW\*(C`rewinddir()\*(C'\fR function for | |
1044 | rewinding directory entry streams, see \*(L"rewinddir\*(R" in perlfunc. | |
1045 | .IP "rmdir" 8 | |
1046 | .IX Item "rmdir" | |
1047 | This is identical to Perl's builtin \f(CW\*(C`rmdir()\*(C'\fR function | |
1048 | for removing (empty) directories, see \*(L"rmdir\*(R" in perlfunc. | |
1049 | .IP "scanf" 8 | |
1050 | .IX Item "scanf" | |
1051 | \&\fIscanf()\fR is C\-specific, use <> and regular expressions instead, | |
1052 | see perlre. | |
1053 | .IP "setgid" 8 | |
1054 | .IX Item "setgid" | |
1055 | Sets the real group identifier and the effective group identifier for | |
1056 | this process. Similar to assigning a value to the Perl's builtin | |
1057 | \&\f(CW$)\fR variable, see \*(L"$GID\*(R" in perlvar, except that the latter | |
1058 | will change only the real user identifier, and that the \fIsetgid()\fR | |
1059 | uses only a single numeric argument, as opposed to a space-separated | |
1060 | list of numbers. | |
1061 | .IP "setjmp" 8 | |
1062 | .IX Item "setjmp" | |
1063 | \&\f(CW\*(C`setjmp()\*(C'\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead, | |
1064 | see \*(L"eval\*(R" in perlfunc. | |
1065 | .IP "setlocale" 8 | |
1066 | .IX Item "setlocale" | |
1067 | Modifies and queries program's locale. The following examples assume | |
1068 | .Sp | |
1069 | .Vb 1 | |
1070 | \& use POSIX qw(setlocale LC_ALL LC_CTYPE); | |
1071 | .Ve | |
1072 | .Sp | |
1073 | has been issued. | |
1074 | .Sp | |
1075 | The following will set the traditional \s-1UNIX\s0 system locale behavior | |
1076 | (the second argument \f(CW"C"\fR). | |
1077 | .Sp | |
1078 | .Vb 1 | |
1079 | \& $loc = setlocale( LC_ALL, "C" ); | |
1080 | .Ve | |
1081 | .Sp | |
1082 | The following will query the current \s-1LC_CTYPE\s0 category. (No second | |
1083 | argument means 'query'.) | |
1084 | .Sp | |
1085 | .Vb 1 | |
1086 | \& $loc = setlocale( LC_CTYPE ); | |
1087 | .Ve | |
1088 | .Sp | |
1089 | The following will set the \s-1LC_CTYPE\s0 behaviour according to the locale | |
1090 | environment variables (the second argument \f(CW""\fR). | |
1091 | Please see your systems \f(CWsetlocale(3)\fR documentation for the locale | |
1092 | environment variables' meaning or consult perllocale. | |
1093 | .Sp | |
1094 | .Vb 1 | |
1095 | \& $loc = setlocale( LC_CTYPE, "" ); | |
1096 | .Ve | |
1097 | .Sp | |
1098 | The following will set the \s-1LC_COLLATE\s0 behaviour to Argentinian | |
1099 | Spanish. \fB\s-1NOTE\s0\fR: The naming and availability of locales depends on | |
1100 | your operating system. Please consult perllocale for how to find | |
1101 | out which locales are available in your system. | |
1102 | .Sp | |
1103 | .Vb 1 | |
1104 | \& $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" ); | |
1105 | .Ve | |
1106 | .IP "setpgid" 8 | |
1107 | .IX Item "setpgid" | |
1108 | This is similar to the C function \f(CW\*(C`setpgid()\*(C'\fR for | |
1109 | setting the process group identifier of the current process. | |
1110 | .Sp | |
1111 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1112 | .IP "setsid" 8 | |
1113 | .IX Item "setsid" | |
1114 | This is identical to the C function \f(CW\*(C`setsid()\*(C'\fR for | |
1115 | setting the session identifier of the current process. | |
1116 | .IP "setuid" 8 | |
1117 | .IX Item "setuid" | |
1118 | Sets the real user identifier and the effective user identifier for | |
1119 | this process. Similar to assigning a value to the Perl's builtin | |
1120 | \&\f(CW$<\fR variable, see \*(L"$UID\*(R" in perlvar, except that the latter | |
1121 | will change only the real user identifier. | |
1122 | .IP "sigaction" 8 | |
1123 | .IX Item "sigaction" | |
1124 | Detailed signal management. This uses \f(CW\*(C`POSIX::SigAction\*(C'\fR objects for the | |
1125 | \&\f(CW\*(C`action\*(C'\fR and \f(CW\*(C`oldaction\*(C'\fR arguments. Consult your system's \f(CW\*(C`sigaction\*(C'\fR | |
1126 | manpage for details. | |
1127 | .Sp | |
1128 | Synopsis: | |
1129 | .Sp | |
1130 | .Vb 1 | |
1131 | \& sigaction(sig, action, oldaction = 0) | |
1132 | .Ve | |
1133 | .Sp | |
1134 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1135 | .IP "siglongjmp" 8 | |
1136 | .IX Item "siglongjmp" | |
1137 | \&\fIsiglongjmp()\fR is C\-specific: use \*(L"die\*(R" in perlfunc instead. | |
1138 | .IP "sigpending" 8 | |
1139 | .IX Item "sigpending" | |
1140 | Examine signals that are blocked and pending. This uses \f(CW\*(C`POSIX::SigSet\*(C'\fR | |
1141 | objects for the \f(CW\*(C`sigset\*(C'\fR argument. Consult your system's \f(CW\*(C`sigpending\*(C'\fR | |
1142 | manpage for details. | |
1143 | .Sp | |
1144 | Synopsis: | |
1145 | .Sp | |
1146 | .Vb 1 | |
1147 | \& sigpending(sigset) | |
1148 | .Ve | |
1149 | .Sp | |
1150 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1151 | .IP "sigprocmask" 8 | |
1152 | .IX Item "sigprocmask" | |
1153 | Change and/or examine calling process's signal mask. This uses | |
1154 | \&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`sigset\*(C'\fR and \f(CW\*(C`oldsigset\*(C'\fR arguments. | |
1155 | Consult your system's \f(CW\*(C`sigprocmask\*(C'\fR manpage for details. | |
1156 | .Sp | |
1157 | Synopsis: | |
1158 | .Sp | |
1159 | .Vb 1 | |
1160 | \& sigprocmask(how, sigset, oldsigset = 0) | |
1161 | .Ve | |
1162 | .Sp | |
1163 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1164 | .IP "sigsetjmp" 8 | |
1165 | .IX Item "sigsetjmp" | |
1166 | \&\f(CW\*(C`sigsetjmp()\*(C'\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead, | |
1167 | see \*(L"eval\*(R" in perlfunc. | |
1168 | .IP "sigsuspend" 8 | |
1169 | .IX Item "sigsuspend" | |
1170 | Install a signal mask and suspend process until signal arrives. This uses | |
1171 | \&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`signal_mask\*(C'\fR argument. Consult your | |
1172 | system's \f(CW\*(C`sigsuspend\*(C'\fR manpage for details. | |
1173 | .Sp | |
1174 | Synopsis: | |
1175 | .Sp | |
1176 | .Vb 1 | |
1177 | \& sigsuspend(signal_mask) | |
1178 | .Ve | |
1179 | .Sp | |
1180 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1181 | .IP "sin" 8 | |
1182 | .IX Item "sin" | |
1183 | This is identical to Perl's builtin \f(CW\*(C`sin()\*(C'\fR function | |
1184 | for returning the sine of the numerical argument, | |
1185 | see \*(L"sin\*(R" in perlfunc. See also Math::Trig. | |
1186 | .IP "sinh" 8 | |
1187 | .IX Item "sinh" | |
1188 | This is identical to the C function \f(CW\*(C`sinh()\*(C'\fR | |
1189 | for returning the hyperbolic sine of the numerical argument. | |
1190 | See also Math::Trig. | |
1191 | .IP "sleep" 8 | |
1192 | .IX Item "sleep" | |
1193 | This is functionally identical to Perl's builtin \f(CW\*(C`sleep()\*(C'\fR function | |
1194 | for suspending the execution of the current for process for certain | |
1195 | number of seconds, see \*(L"sleep\*(R" in perlfunc. There is one signifanct | |
1196 | difference, however: \f(CW\*(C`POSIX::sleep()\*(C'\fR returns the number of | |
1197 | \&\fBunslept\fR seconds, while the \f(CW\*(C`CORE::sleep()\*(C'\fR returns the | |
1198 | number of slept seconds. | |
1199 | .IP "sprintf" 8 | |
1200 | .IX Item "sprintf" | |
1201 | This is similar to Perl's builtin \f(CW\*(C`sprintf()\*(C'\fR function | |
1202 | for returning a string that has the arguments formatted as requested, | |
1203 | see \*(L"sprintf\*(R" in perlfunc. | |
1204 | .IP "sqrt" 8 | |
1205 | .IX Item "sqrt" | |
1206 | This is identical to Perl's builtin \f(CW\*(C`sqrt()\*(C'\fR function. | |
1207 | for returning the square root of the numerical argument, | |
1208 | see \*(L"sqrt\*(R" in perlfunc. | |
1209 | .IP "srand" 8 | |
1210 | .IX Item "srand" | |
1211 | Give a seed the pseudorandom number generator, see \*(L"srand\*(R" in perlfunc. | |
1212 | .IP "sscanf" 8 | |
1213 | .IX Item "sscanf" | |
1214 | \&\fIsscanf()\fR is C\-specific, use regular expressions instead, | |
1215 | see perlre. | |
1216 | .IP "stat" 8 | |
1217 | .IX Item "stat" | |
1218 | This is identical to Perl's builtin \f(CW\*(C`stat()\*(C'\fR function | |
1219 | for retutning information about files and directories. | |
1220 | .IP "strcat" 8 | |
1221 | .IX Item "strcat" | |
1222 | \&\fIstrcat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop. | |
1223 | .IP "strchr" 8 | |
1224 | .IX Item "strchr" | |
1225 | \&\fIstrchr()\fR is C\-specific, see \*(L"index\*(R" in perlfunc instead. | |
1226 | .IP "strcmp" 8 | |
1227 | .IX Item "strcmp" | |
1228 | \&\fIstrcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR or \f(CW\*(C`cmp\*(C'\fR instead, see perlop. | |
1229 | .IP "strcoll" 8 | |
1230 | .IX Item "strcoll" | |
1231 | This is identical to the C function \f(CW\*(C`strcoll()\*(C'\fR | |
1232 | for collating (comparing) strings transformed using | |
1233 | the \f(CW\*(C`strxfrm()\*(C'\fR function. Not really needed since | |
1234 | Perl can do this transparently, see perllocale. | |
1235 | .IP "strcpy" 8 | |
1236 | .IX Item "strcpy" | |
1237 | \&\fIstrcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop. | |
1238 | .IP "strcspn" 8 | |
1239 | .IX Item "strcspn" | |
1240 | \&\fIstrcspn()\fR is C\-specific, use regular expressions instead, | |
1241 | see perlre. | |
1242 | .IP "strerror" 8 | |
1243 | .IX Item "strerror" | |
1244 | Returns the error string for the specified errno. | |
1245 | Identical to the string form of the \f(CW$!\fR, see \*(L"$ERRNO\*(R" in perlvar. | |
1246 | .IP "strftime" 8 | |
1247 | .IX Item "strftime" | |
1248 | Convert date and time information to string. Returns the string. | |
1249 | .Sp | |
1250 | Synopsis: | |
1251 | .Sp | |
1252 | .Vb 1 | |
1253 | \& strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) | |
1254 | .Ve | |
1255 | .Sp | |
1256 | The month (\f(CW\*(C`mon\*(C'\fR), weekday (\f(CW\*(C`wday\*(C'\fR), and yearday (\f(CW\*(C`yday\*(C'\fR) begin at zero. | |
1257 | I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The | |
1258 | year (\f(CW\*(C`year\*(C'\fR) is given in years since 1900. I.e., the year 1995 is 95; the | |
1259 | year 2001 is 101. Consult your system's \f(CW\*(C`strftime()\*(C'\fR manpage for details | |
1260 | about these and the other arguments. | |
1261 | If you want your code to be portable, your format (\f(CW\*(C`fmt\*(C'\fR) argument | |
1262 | should use only the conversion specifiers defined by the \s-1ANSI\s0 C | |
1263 | standard. These are \f(CW\*(C`aAbBcdHIjmMpSUwWxXyYZ%\*(C'\fR. | |
1264 | The given arguments are made consistent | |
1265 | as though by calling \f(CW\*(C`mktime()\*(C'\fR before calling your system's | |
1266 | \&\f(CW\*(C`strftime()\*(C'\fR function, except that the \f(CW\*(C`isdst\*(C'\fR value is not affected. | |
1267 | .Sp | |
1268 | The string for Tuesday, December 12, 1995. | |
1269 | .Sp | |
1270 | .Vb 2 | |
1271 | \& $str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 ); | |
1272 | \& print "$str\en"; | |
1273 | .Ve | |
1274 | .IP "strlen" 8 | |
1275 | .IX Item "strlen" | |
1276 | \&\fIstrlen()\fR is C\-specific, use \f(CW\*(C`length()\*(C'\fR instead, see \*(L"length\*(R" in perlfunc. | |
1277 | .IP "strncat" 8 | |
1278 | .IX Item "strncat" | |
1279 | \&\fIstrncat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop. | |
1280 | .IP "strncmp" 8 | |
1281 | .IX Item "strncmp" | |
1282 | \&\fIstrncmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop. | |
1283 | .IP "strncpy" 8 | |
1284 | .IX Item "strncpy" | |
1285 | \&\fIstrncpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop. | |
1286 | .IP "strpbrk" 8 | |
1287 | .IX Item "strpbrk" | |
1288 | \&\fIstrpbrk()\fR is C\-specific, use regular expressions instead, | |
1289 | see perlre. | |
1290 | .IP "strrchr" 8 | |
1291 | .IX Item "strrchr" | |
1292 | \&\fIstrrchr()\fR is C\-specific, see \*(L"rindex\*(R" in perlfunc instead. | |
1293 | .IP "strspn" 8 | |
1294 | .IX Item "strspn" | |
1295 | \&\fIstrspn()\fR is C\-specific, use regular expressions instead, | |
1296 | see perlre. | |
1297 | .IP "strstr" 8 | |
1298 | .IX Item "strstr" | |
1299 | This is identical to Perl's builtin \f(CW\*(C`index()\*(C'\fR function, | |
1300 | see \*(L"index\*(R" in perlfunc. | |
1301 | .IP "strtod" 8 | |
1302 | .IX Item "strtod" | |
1303 | String to double translation. Returns the parsed number and the number | |
1304 | of characters in the unparsed portion of the string. Truly | |
1305 | POSIX-compliant systems set $! ($ERRNO) to indicate a translation | |
1306 | error, so clear $! before calling strtod. However, non-POSIX systems | |
1307 | may not check for overflow, and therefore will never set $!. | |
1308 | .Sp | |
1309 | strtod should respect any \s-1POSIX\s0 \fI\fIsetlocale()\fI\fR settings. | |
1310 | .Sp | |
1311 | To parse a string \f(CW$str\fR as a floating point number use | |
1312 | .Sp | |
1313 | .Vb 2 | |
1314 | \& $! = 0; | |
1315 | \& ($num, $n_unparsed) = POSIX::strtod($str); | |
1316 | .Ve | |
1317 | .Sp | |
1318 | The second returned item and $! can be used to check for valid input: | |
1319 | .Sp | |
1320 | .Vb 3 | |
1321 | \& if (($str eq '') || ($n_unparsed != 0) || !$!) { | |
1322 | \& die "Non-numeric input $str" . $! ? ": $!\en" : "\en"; | |
1323 | \& } | |
1324 | .Ve | |
1325 | .Sp | |
1326 | When called in a scalar context strtod returns the parsed number. | |
1327 | .IP "strtok" 8 | |
1328 | .IX Item "strtok" | |
1329 | \&\fIstrtok()\fR is C\-specific, use regular expressions instead, see | |
1330 | perlre, or \*(L"split\*(R" in perlfunc. | |
1331 | .IP "strtol" 8 | |
1332 | .IX Item "strtol" | |
1333 | String to (long) integer translation. Returns the parsed number and | |
1334 | the number of characters in the unparsed portion of the string. Truly | |
1335 | POSIX-compliant systems set $! ($ERRNO) to indicate a translation | |
1336 | error, so clear $! before calling strtol. However, non-POSIX systems | |
1337 | may not check for overflow, and therefore will never set $!. | |
1338 | .Sp | |
1339 | strtol should respect any \s-1POSIX\s0 \fI\fIsetlocale()\fI\fR settings. | |
1340 | .Sp | |
1341 | To parse a string \f(CW$str\fR as a number in some base \f(CW$base\fR use | |
1342 | .Sp | |
1343 | .Vb 2 | |
1344 | \& $! = 0; | |
1345 | \& ($num, $n_unparsed) = POSIX::strtol($str, $base); | |
1346 | .Ve | |
1347 | .Sp | |
1348 | The base should be zero or between 2 and 36, inclusive. When the base | |
1349 | is zero or omitted strtol will use the string itself to determine the | |
1350 | base: a leading \*(L"0x\*(R" or \*(L"0X\*(R" means hexadecimal; a leading \*(L"0\*(R" means | |
1351 | octal; any other leading characters mean decimal. Thus, \*(L"1234\*(R" is | |
1352 | parsed as a decimal number, \*(L"01234\*(R" as an octal number, and \*(L"0x1234\*(R" | |
1353 | as a hexadecimal number. | |
1354 | .Sp | |
1355 | The second returned item and $! can be used to check for valid input: | |
1356 | .Sp | |
1357 | .Vb 3 | |
1358 | \& if (($str eq '') || ($n_unparsed != 0) || !$!) { | |
1359 | \& die "Non-numeric input $str" . $! ? ": $!\en" : "\en"; | |
1360 | \& } | |
1361 | .Ve | |
1362 | .Sp | |
1363 | When called in a scalar context strtol returns the parsed number. | |
1364 | .IP "strtoul" 8 | |
1365 | .IX Item "strtoul" | |
1366 | String to unsigned (long) integer translation. \fIstrtoul()\fR is identical | |
1367 | to \fIstrtol()\fR except that \fIstrtoul()\fR only parses unsigned integers. See | |
1368 | \&\*(L"strtol\*(R" for details. | |
1369 | .Sp | |
1370 | Note: Some vendors supply \fIstrtod()\fR and \fIstrtol()\fR but not \fIstrtoul()\fR. | |
1371 | Other vendors that do supply \fIstrtoul()\fR parse \*(L"\-1\*(R" as a valid value. | |
1372 | .IP "strxfrm" 8 | |
1373 | .IX Item "strxfrm" | |
1374 | String transformation. Returns the transformed string. | |
1375 | .Sp | |
1376 | .Vb 1 | |
1377 | \& $dst = POSIX::strxfrm( $src ); | |
1378 | .Ve | |
1379 | .Sp | |
1380 | Used in conjunction with the \f(CW\*(C`strcoll()\*(C'\fR function, see \*(L"strcoll\*(R". | |
1381 | .Sp | |
1382 | Not really needed since Perl can do this transparently, see | |
1383 | perllocale. | |
1384 | .IP "sysconf" 8 | |
1385 | .IX Item "sysconf" | |
1386 | Retrieves values of system configurable variables. | |
1387 | .Sp | |
1388 | The following will get the machine's clock speed. | |
1389 | .Sp | |
1390 | .Vb 1 | |
1391 | \& $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK ); | |
1392 | .Ve | |
1393 | .Sp | |
1394 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1395 | .IP "system" 8 | |
1396 | .IX Item "system" | |
1397 | This is identical to Perl's builtin \f(CW\*(C`system()\*(C'\fR function, see | |
1398 | \&\*(L"system\*(R" in perlfunc. | |
1399 | .IP "tan" 8 | |
1400 | .IX Item "tan" | |
1401 | This is identical to the C function \f(CW\*(C`tan()\*(C'\fR, returning the | |
1402 | tangent of the numerical argument. See also Math::Trig. | |
1403 | .IP "tanh" 8 | |
1404 | .IX Item "tanh" | |
1405 | This is identical to the C function \f(CW\*(C`tanh()\*(C'\fR, returning the | |
1406 | hyperbolic tangent of the numerical argument. See also Math::Trig. | |
1407 | .IP "tcdrain" 8 | |
1408 | .IX Item "tcdrain" | |
1409 | This is similar to the C function \f(CW\*(C`tcdrain()\*(C'\fR for draining | |
1410 | the output queue of its argument stream. | |
1411 | .Sp | |
1412 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1413 | .IP "tcflow" 8 | |
1414 | .IX Item "tcflow" | |
1415 | This is similar to the C function \f(CW\*(C`tcflow()\*(C'\fR for controlling | |
1416 | the flow of its argument stream. | |
1417 | .Sp | |
1418 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1419 | .IP "tcflush" 8 | |
1420 | .IX Item "tcflush" | |
1421 | This is similar to the C function \f(CW\*(C`tcflush()\*(C'\fR for flushing | |
1422 | the I/O buffers of its argumeny stream. | |
1423 | .Sp | |
1424 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1425 | .IP "tcgetpgrp" 8 | |
1426 | .IX Item "tcgetpgrp" | |
1427 | This is identical to the C function \f(CW\*(C`tcgetpgrp()\*(C'\fR for returning the | |
1428 | process group identifier of the foreground process group of the controlling | |
1429 | terminal. | |
1430 | .IP "tcsendbreak" 8 | |
1431 | .IX Item "tcsendbreak" | |
1432 | This is similar to the C function \f(CW\*(C`tcsendbreak()\*(C'\fR for sending | |
1433 | a break on its argument stream. | |
1434 | .Sp | |
1435 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1436 | .IP "tcsetpgrp" 8 | |
1437 | .IX Item "tcsetpgrp" | |
1438 | This is similar to the C function \f(CW\*(C`tcsetpgrp()\*(C'\fR for setting the | |
1439 | process group identifier of the foreground process group of the controlling | |
1440 | terminal. | |
1441 | .Sp | |
1442 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1443 | .IP "time" 8 | |
1444 | .IX Item "time" | |
1445 | This is identical to Perl's builtin \f(CW\*(C`time()\*(C'\fR function | |
1446 | for returning the number of seconds since the epoch | |
1447 | (whatever it is for the system), see \*(L"time\*(R" in perlfunc. | |
1448 | .IP "times" 8 | |
1449 | .IX Item "times" | |
1450 | The \fItimes()\fR function returns elapsed realtime since some point in the past | |
1451 | (such as system startup), user and system times for this process, and user | |
1452 | and system times used by child processes. All times are returned in clock | |
1453 | ticks. | |
1454 | .Sp | |
1455 | .Vb 1 | |
1456 | \& ($realtime, $user, $system, $cuser, $csystem) = POSIX::times(); | |
1457 | .Ve | |
1458 | .Sp | |
1459 | Note: Perl's builtin \f(CW\*(C`times()\*(C'\fR function returns four values, measured in | |
1460 | seconds. | |
1461 | .IP "tmpfile" 8 | |
1462 | .IX Item "tmpfile" | |
1463 | Use method \f(CW\*(C`IO::File::new_tmpfile()\*(C'\fR instead, or see File::Temp. | |
1464 | .IP "tmpnam" 8 | |
1465 | .IX Item "tmpnam" | |
1466 | Returns a name for a temporary file. | |
1467 | .Sp | |
1468 | .Vb 1 | |
1469 | \& $tmpfile = POSIX::tmpnam(); | |
1470 | .Ve | |
1471 | .Sp | |
1472 | For security reasons, which are probably detailed in your system's | |
1473 | documentation for the C library \fItmpnam()\fR function, this interface | |
1474 | should not be used; instead see File::Temp. | |
1475 | .IP "tolower" 8 | |
1476 | .IX Item "tolower" | |
1477 | This is identical to the C function, except that it can apply to a single | |
1478 | character or to a whole string. Consider using the \f(CW\*(C`lc()\*(C'\fR function, | |
1479 | see \*(L"lc\*(R" in perlfunc, or the equivalent \f(CW\*(C`\eL\*(C'\fR operator inside doublequotish | |
1480 | strings. | |
1481 | .IP "toupper" 8 | |
1482 | .IX Item "toupper" | |
1483 | This is identical to the C function, except that it can apply to a single | |
1484 | character or to a whole string. Consider using the \f(CW\*(C`uc()\*(C'\fR function, | |
1485 | see \*(L"uc\*(R" in perlfunc, or the equivalent \f(CW\*(C`\eU\*(C'\fR operator inside doublequotish | |
1486 | strings. | |
1487 | .IP "ttyname" 8 | |
1488 | .IX Item "ttyname" | |
1489 | This is identical to the C function \f(CW\*(C`ttyname()\*(C'\fR for returning the | |
1490 | name of the current terminal. | |
1491 | .IP "tzname" 8 | |
1492 | .IX Item "tzname" | |
1493 | Retrieves the time conversion information from the \f(CW\*(C`tzname\*(C'\fR variable. | |
1494 | .Sp | |
1495 | .Vb 2 | |
1496 | \& POSIX::tzset(); | |
1497 | \& ($std, $dst) = POSIX::tzname(); | |
1498 | .Ve | |
1499 | .IP "tzset" 8 | |
1500 | .IX Item "tzset" | |
1501 | This is identical to the C function \f(CW\*(C`tzset()\*(C'\fR for setting | |
1502 | the current timezone based on the environment variable \f(CW\*(C`TZ\*(C'\fR, | |
1503 | to be used by \f(CW\*(C`ctime()\*(C'\fR, \f(CW\*(C`localtime()\*(C'\fR, \f(CW\*(C`mktime()\*(C'\fR, and \f(CW\*(C`strftime()\*(C'\fR | |
1504 | functions. | |
1505 | .IP "umask" 8 | |
1506 | .IX Item "umask" | |
1507 | This is identical to Perl's builtin \f(CW\*(C`umask()\*(C'\fR function | |
1508 | for setting (and querying) the file creation permission mask, | |
1509 | see \*(L"umask\*(R" in perlfunc. | |
1510 | .IP "uname" 8 | |
1511 | .IX Item "uname" | |
1512 | Get name of current operating system. | |
1513 | .Sp | |
1514 | .Vb 1 | |
1515 | \& ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); | |
1516 | .Ve | |
1517 | .Sp | |
1518 | Note that the actual meanings of the various fields are not | |
1519 | that well standardized, do not expect any great portability. | |
1520 | The \f(CW$sysname\fR might be the name of the operating system, | |
1521 | the \f(CW$nodename\fR might be the name of the host, the \f(CW$release\fR | |
1522 | might be the (major) release number of the operating system, | |
1523 | the \f(CW$version\fR might be the (minor) release number of the | |
1524 | operating system, and the \f(CW$machine\fR might be a hardware identifier. | |
1525 | Maybe. | |
1526 | .IP "ungetc" 8 | |
1527 | .IX Item "ungetc" | |
1528 | Use method \f(CW\*(C`IO::Handle::ungetc()\*(C'\fR instead. | |
1529 | .IP "unlink" 8 | |
1530 | .IX Item "unlink" | |
1531 | This is identical to Perl's builtin \f(CW\*(C`unlink()\*(C'\fR function | |
1532 | for removing files, see \*(L"unlink\*(R" in perlfunc. | |
1533 | .IP "utime" 8 | |
1534 | .IX Item "utime" | |
1535 | This is identical to Perl's builtin \f(CW\*(C`utime()\*(C'\fR function | |
1536 | for changing the time stamps of files and directories, | |
1537 | see \*(L"utime\*(R" in perlfunc. | |
1538 | .IP "vfprintf" 8 | |
1539 | .IX Item "vfprintf" | |
1540 | \&\fIvfprintf()\fR is C\-specific, see \*(L"printf\*(R" in perlfunc instead. | |
1541 | .IP "vprintf" 8 | |
1542 | .IX Item "vprintf" | |
1543 | \&\fIvprintf()\fR is C\-specific, see \*(L"printf\*(R" in perlfunc instead. | |
1544 | .IP "vsprintf" 8 | |
1545 | .IX Item "vsprintf" | |
1546 | \&\fIvsprintf()\fR is C\-specific, see \*(L"sprintf\*(R" in perlfunc instead. | |
1547 | .IP "wait" 8 | |
1548 | .IX Item "wait" | |
1549 | This is identical to Perl's builtin \f(CW\*(C`wait()\*(C'\fR function, | |
1550 | see \*(L"wait\*(R" in perlfunc. | |
1551 | .IP "waitpid" 8 | |
1552 | .IX Item "waitpid" | |
1553 | Wait for a child process to change state. This is identical to Perl's | |
1554 | builtin \f(CW\*(C`waitpid()\*(C'\fR function, see \*(L"waitpid\*(R" in perlfunc. | |
1555 | .Sp | |
1556 | .Vb 2 | |
1557 | \& $pid = POSIX::waitpid( -1, POSIX::WNOHANG ); | |
1558 | \& print "status = ", ($? / 256), "\en"; | |
1559 | .Ve | |
1560 | .IP "wcstombs" 8 | |
1561 | .IX Item "wcstombs" | |
1562 | This is identical to the C function \f(CW\*(C`wcstombs()\*(C'\fR. | |
1563 | Perl does not have any support for the wide and multibyte | |
1564 | characters of the C standards, so this might be a rather | |
1565 | useless function. | |
1566 | .IP "wctomb" 8 | |
1567 | .IX Item "wctomb" | |
1568 | This is identical to the C function \f(CW\*(C`wctomb()\*(C'\fR. | |
1569 | Perl does not have any support for the wide and multibyte | |
1570 | characters of the C standards, so this might be a rather | |
1571 | useless function. | |
1572 | .IP "write" 8 | |
1573 | .IX Item "write" | |
1574 | Write to a file. This uses file descriptors such as those obtained by | |
1575 | calling \f(CW\*(C`POSIX::open\*(C'\fR. | |
1576 | .Sp | |
1577 | .Vb 3 | |
1578 | \& $fd = POSIX::open( "foo", &POSIX::O_WRONLY ); | |
1579 | \& $buf = "hello"; | |
1580 | \& $bytes = POSIX::write( $b, $buf, 5 ); | |
1581 | .Ve | |
1582 | .Sp | |
1583 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1584 | .Sp | |
1585 | See also \*(L"syswrite\*(R" in perlfunc. | |
1586 | .SH "CLASSES" | |
1587 | .IX Header "CLASSES" | |
1588 | .Sh "POSIX::SigAction" | |
1589 | .IX Subsection "POSIX::SigAction" | |
1590 | .IP "new" 8 | |
1591 | .IX Item "new" | |
1592 | Creates a new \f(CW\*(C`POSIX::SigAction\*(C'\fR object which corresponds to the C | |
1593 | \&\f(CW\*(C`struct sigaction\*(C'\fR. This object will be destroyed automatically when it is | |
1594 | no longer needed. The first parameter is the fully-qualified name of a sub | |
1595 | which is a signal\-handler. The second parameter is a \f(CW\*(C`POSIX::SigSet\*(C'\fR | |
1596 | object, it defaults to the empty set. The third parameter contains the | |
1597 | \&\f(CW\*(C`sa_flags\*(C'\fR, it defaults to 0. | |
1598 | .Sp | |
1599 | .Vb 2 | |
1600 | \& $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT); | |
1601 | \& $sigaction = POSIX::SigAction->new( 'main::handler', $sigset, &POSIX::SA_NOCLDSTOP ); | |
1602 | .Ve | |
1603 | .Sp | |
1604 | This \f(CW\*(C`POSIX::SigAction\*(C'\fR object should be used with the \f(CW\*(C`POSIX::sigaction()\*(C'\fR | |
1605 | function. | |
1606 | .Sh "POSIX::SigSet" | |
1607 | .IX Subsection "POSIX::SigSet" | |
1608 | .IP "new" 8 | |
1609 | .IX Item "new" | |
1610 | Create a new SigSet object. This object will be destroyed automatically | |
1611 | when it is no longer needed. Arguments may be supplied to initialize the | |
1612 | set. | |
1613 | .Sp | |
1614 | Create an empty set. | |
1615 | .Sp | |
1616 | .Vb 1 | |
1617 | \& $sigset = POSIX::SigSet->new; | |
1618 | .Ve | |
1619 | .Sp | |
1620 | Create a set with \s-1SIGUSR1\s0. | |
1621 | .Sp | |
1622 | .Vb 1 | |
1623 | \& $sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 ); | |
1624 | .Ve | |
1625 | .IP "addset" 8 | |
1626 | .IX Item "addset" | |
1627 | Add a signal to a SigSet object. | |
1628 | .Sp | |
1629 | .Vb 1 | |
1630 | \& $sigset->addset( &POSIX::SIGUSR2 ); | |
1631 | .Ve | |
1632 | .Sp | |
1633 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1634 | .IP "delset" 8 | |
1635 | .IX Item "delset" | |
1636 | Remove a signal from the SigSet object. | |
1637 | .Sp | |
1638 | .Vb 1 | |
1639 | \& $sigset->delset( &POSIX::SIGUSR2 ); | |
1640 | .Ve | |
1641 | .Sp | |
1642 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1643 | .IP "emptyset" 8 | |
1644 | .IX Item "emptyset" | |
1645 | Initialize the SigSet object to be empty. | |
1646 | .Sp | |
1647 | .Vb 1 | |
1648 | \& $sigset->emptyset(); | |
1649 | .Ve | |
1650 | .Sp | |
1651 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1652 | .IP "fillset" 8 | |
1653 | .IX Item "fillset" | |
1654 | Initialize the SigSet object to include all signals. | |
1655 | .Sp | |
1656 | .Vb 1 | |
1657 | \& $sigset->fillset(); | |
1658 | .Ve | |
1659 | .Sp | |
1660 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1661 | .IP "ismember" 8 | |
1662 | .IX Item "ismember" | |
1663 | Tests the SigSet object to see if it contains a specific signal. | |
1664 | .Sp | |
1665 | .Vb 3 | |
1666 | \& if( $sigset->ismember( &POSIX::SIGUSR1 ) ){ | |
1667 | \& print "contains SIGUSR1\en"; | |
1668 | \& } | |
1669 | .Ve | |
1670 | .Sh "POSIX::Termios" | |
1671 | .IX Subsection "POSIX::Termios" | |
1672 | .IP "new" 8 | |
1673 | .IX Item "new" | |
1674 | Create a new Termios object. This object will be destroyed automatically | |
1675 | when it is no longer needed. A Termios object corresponds to the termios | |
1676 | C struct. \fInew()\fR mallocs a new one, \fIgetattr()\fR fills it from a file descriptor, | |
1677 | and \fIsetattr()\fR sets a file descriptor's parameters to match Termios' contents. | |
1678 | .Sp | |
1679 | .Vb 1 | |
1680 | \& $termios = POSIX::Termios->new; | |
1681 | .Ve | |
1682 | .IP "getattr" 8 | |
1683 | .IX Item "getattr" | |
1684 | Get terminal control attributes. | |
1685 | .Sp | |
1686 | Obtain the attributes for stdin. | |
1687 | .Sp | |
1688 | .Vb 1 | |
1689 | \& $termios->getattr() | |
1690 | .Ve | |
1691 | .Sp | |
1692 | Obtain the attributes for stdout. | |
1693 | .Sp | |
1694 | .Vb 1 | |
1695 | \& $termios->getattr( 1 ) | |
1696 | .Ve | |
1697 | .Sp | |
1698 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1699 | .IP "getcc" 8 | |
1700 | .IX Item "getcc" | |
1701 | Retrieve a value from the c_cc field of a termios object. The c_cc field is | |
1702 | an array so an index must be specified. | |
1703 | .Sp | |
1704 | .Vb 1 | |
1705 | \& $c_cc[1] = $termios->getcc(1); | |
1706 | .Ve | |
1707 | .IP "getcflag" 8 | |
1708 | .IX Item "getcflag" | |
1709 | Retrieve the c_cflag field of a termios object. | |
1710 | .Sp | |
1711 | .Vb 1 | |
1712 | \& $c_cflag = $termios->getcflag; | |
1713 | .Ve | |
1714 | .IP "getiflag" 8 | |
1715 | .IX Item "getiflag" | |
1716 | Retrieve the c_iflag field of a termios object. | |
1717 | .Sp | |
1718 | .Vb 1 | |
1719 | \& $c_iflag = $termios->getiflag; | |
1720 | .Ve | |
1721 | .IP "getispeed" 8 | |
1722 | .IX Item "getispeed" | |
1723 | Retrieve the input baud rate. | |
1724 | .Sp | |
1725 | .Vb 1 | |
1726 | \& $ispeed = $termios->getispeed; | |
1727 | .Ve | |
1728 | .IP "getlflag" 8 | |
1729 | .IX Item "getlflag" | |
1730 | Retrieve the c_lflag field of a termios object. | |
1731 | .Sp | |
1732 | .Vb 1 | |
1733 | \& $c_lflag = $termios->getlflag; | |
1734 | .Ve | |
1735 | .IP "getoflag" 8 | |
1736 | .IX Item "getoflag" | |
1737 | Retrieve the c_oflag field of a termios object. | |
1738 | .Sp | |
1739 | .Vb 1 | |
1740 | \& $c_oflag = $termios->getoflag; | |
1741 | .Ve | |
1742 | .IP "getospeed" 8 | |
1743 | .IX Item "getospeed" | |
1744 | Retrieve the output baud rate. | |
1745 | .Sp | |
1746 | .Vb 1 | |
1747 | \& $ospeed = $termios->getospeed; | |
1748 | .Ve | |
1749 | .IP "setattr" 8 | |
1750 | .IX Item "setattr" | |
1751 | Set terminal control attributes. | |
1752 | .Sp | |
1753 | Set attributes immediately for stdout. | |
1754 | .Sp | |
1755 | .Vb 1 | |
1756 | \& $termios->setattr( 1, &POSIX::TCSANOW ); | |
1757 | .Ve | |
1758 | .Sp | |
1759 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1760 | .IP "setcc" 8 | |
1761 | .IX Item "setcc" | |
1762 | Set a value in the c_cc field of a termios object. The c_cc field is an | |
1763 | array so an index must be specified. | |
1764 | .Sp | |
1765 | .Vb 1 | |
1766 | \& $termios->setcc( &POSIX::VEOF, 1 ); | |
1767 | .Ve | |
1768 | .IP "setcflag" 8 | |
1769 | .IX Item "setcflag" | |
1770 | Set the c_cflag field of a termios object. | |
1771 | .Sp | |
1772 | .Vb 1 | |
1773 | \& $termios->setcflag( $c_cflag | &POSIX::CLOCAL ); | |
1774 | .Ve | |
1775 | .IP "setiflag" 8 | |
1776 | .IX Item "setiflag" | |
1777 | Set the c_iflag field of a termios object. | |
1778 | .Sp | |
1779 | .Vb 1 | |
1780 | \& $termios->setiflag( $c_iflag | &POSIX::BRKINT ); | |
1781 | .Ve | |
1782 | .IP "setispeed" 8 | |
1783 | .IX Item "setispeed" | |
1784 | Set the input baud rate. | |
1785 | .Sp | |
1786 | .Vb 1 | |
1787 | \& $termios->setispeed( &POSIX::B9600 ); | |
1788 | .Ve | |
1789 | .Sp | |
1790 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1791 | .IP "setlflag" 8 | |
1792 | .IX Item "setlflag" | |
1793 | Set the c_lflag field of a termios object. | |
1794 | .Sp | |
1795 | .Vb 1 | |
1796 | \& $termios->setlflag( $c_lflag | &POSIX::ECHO ); | |
1797 | .Ve | |
1798 | .IP "setoflag" 8 | |
1799 | .IX Item "setoflag" | |
1800 | Set the c_oflag field of a termios object. | |
1801 | .Sp | |
1802 | .Vb 1 | |
1803 | \& $termios->setoflag( $c_oflag | &POSIX::OPOST ); | |
1804 | .Ve | |
1805 | .IP "setospeed" 8 | |
1806 | .IX Item "setospeed" | |
1807 | Set the output baud rate. | |
1808 | .Sp | |
1809 | .Vb 1 | |
1810 | \& $termios->setospeed( &POSIX::B9600 ); | |
1811 | .Ve | |
1812 | .Sp | |
1813 | Returns \f(CW\*(C`undef\*(C'\fR on failure. | |
1814 | .IP "Baud rate values" 8 | |
1815 | .IX Item "Baud rate values" | |
1816 | B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110 | |
1817 | .IP "Terminal interface values" 8 | |
1818 | .IX Item "Terminal interface values" | |
1819 | \&\s-1TCSADRAIN\s0 \s-1TCSANOW\s0 \s-1TCOON\s0 \s-1TCIOFLUSH\s0 \s-1TCOFLUSH\s0 \s-1TCION\s0 \s-1TCIFLUSH\s0 \s-1TCSAFLUSH\s0 \s-1TCIOFF\s0 \s-1TCOOFF\s0 | |
1820 | .IP "c_cc field values" 8 | |
1821 | .IX Item "c_cc field values" | |
1822 | \&\s-1VEOF\s0 \s-1VEOL\s0 \s-1VERASE\s0 \s-1VINTR\s0 \s-1VKILL\s0 \s-1VQUIT\s0 \s-1VSUSP\s0 \s-1VSTART\s0 \s-1VSTOP\s0 \s-1VMIN\s0 \s-1VTIME\s0 \s-1NCCS\s0 | |
1823 | .IP "c_cflag field values" 8 | |
1824 | .IX Item "c_cflag field values" | |
1825 | \&\s-1CLOCAL\s0 \s-1CREAD\s0 \s-1CSIZE\s0 \s-1CS5\s0 \s-1CS6\s0 \s-1CS7\s0 \s-1CS8\s0 \s-1CSTOPB\s0 \s-1HUPCL\s0 \s-1PARENB\s0 \s-1PARODD\s0 | |
1826 | .IP "c_iflag field values" 8 | |
1827 | .IX Item "c_iflag field values" | |
1828 | \&\s-1BRKINT\s0 \s-1ICRNL\s0 \s-1IGNBRK\s0 \s-1IGNCR\s0 \s-1IGNPAR\s0 \s-1INLCR\s0 \s-1INPCK\s0 \s-1ISTRIP\s0 \s-1IXOFF\s0 \s-1IXON\s0 \s-1PARMRK\s0 | |
1829 | .IP "c_lflag field values" 8 | |
1830 | .IX Item "c_lflag field values" | |
1831 | \&\s-1ECHO\s0 \s-1ECHOE\s0 \s-1ECHOK\s0 \s-1ECHONL\s0 \s-1ICANON\s0 \s-1IEXTEN\s0 \s-1ISIG\s0 \s-1NOFLSH\s0 \s-1TOSTOP\s0 | |
1832 | .IP "c_oflag field values" 8 | |
1833 | .IX Item "c_oflag field values" | |
1834 | \&\s-1OPOST\s0 | |
1835 | .SH "PATHNAME CONSTANTS" | |
1836 | .IX Header "PATHNAME CONSTANTS" | |
1837 | .IP "Constants" 8 | |
1838 | .IX Item "Constants" | |
1839 | _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE | |
1840 | .SH "POSIX CONSTANTS" | |
1841 | .IX Header "POSIX CONSTANTS" | |
1842 | .IP "Constants" 8 | |
1843 | .IX Item "Constants" | |
1844 | _POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION | |
1845 | .SH "SYSTEM CONFIGURATION" | |
1846 | .IX Header "SYSTEM CONFIGURATION" | |
1847 | .IP "Constants" 8 | |
1848 | .IX Item "Constants" | |
1849 | _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION | |
1850 | .SH "ERRNO" | |
1851 | .IX Header "ERRNO" | |
1852 | .IP "Constants" 8 | |
1853 | .IX Item "Constants" | |
1854 | E2BIG \s-1EACCES\s0 \s-1EADDRINUSE\s0 \s-1EADDRNOTAVAIL\s0 \s-1EAFNOSUPPORT\s0 \s-1EAGAIN\s0 \s-1EALREADY\s0 \s-1EBADF\s0 | |
1855 | \&\s-1EBUSY\s0 \s-1ECHILD\s0 \s-1ECONNABORTED\s0 \s-1ECONNREFUSED\s0 \s-1ECONNRESET\s0 \s-1EDEADLK\s0 \s-1EDESTADDRREQ\s0 | |
1856 | \&\s-1EDOM\s0 \s-1EDQUOT\s0 \s-1EEXIST\s0 \s-1EFAULT\s0 \s-1EFBIG\s0 \s-1EHOSTDOWN\s0 \s-1EHOSTUNREACH\s0 \s-1EINPROGRESS\s0 \s-1EINTR\s0 | |
1857 | \&\s-1EINVAL\s0 \s-1EIO\s0 \s-1EISCONN\s0 \s-1EISDIR\s0 \s-1ELOOP\s0 \s-1EMFILE\s0 \s-1EMLINK\s0 \s-1EMSGSIZE\s0 \s-1ENAMETOOLONG\s0 | |
1858 | \&\s-1ENETDOWN\s0 \s-1ENETRESET\s0 \s-1ENETUNREACH\s0 \s-1ENFILE\s0 \s-1ENOBUFS\s0 \s-1ENODEV\s0 \s-1ENOENT\s0 \s-1ENOEXEC\s0 | |
1859 | \&\s-1ENOLCK\s0 \s-1ENOMEM\s0 \s-1ENOPROTOOPT\s0 \s-1ENOSPC\s0 \s-1ENOSYS\s0 \s-1ENOTBLK\s0 \s-1ENOTCONN\s0 \s-1ENOTDIR\s0 | |
1860 | \&\s-1ENOTEMPTY\s0 \s-1ENOTSOCK\s0 \s-1ENOTTY\s0 \s-1ENXIO\s0 \s-1EOPNOTSUPP\s0 \s-1EPERM\s0 \s-1EPFNOSUPPORT\s0 \s-1EPIPE\s0 | |
1861 | \&\s-1EPROCLIM\s0 \s-1EPROTONOSUPPORT\s0 \s-1EPROTOTYPE\s0 \s-1ERANGE\s0 \s-1EREMOTE\s0 \s-1ERESTART\s0 \s-1EROFS\s0 | |
1862 | \&\s-1ESHUTDOWN\s0 \s-1ESOCKTNOSUPPORT\s0 \s-1ESPIPE\s0 \s-1ESRCH\s0 \s-1ESTALE\s0 \s-1ETIMEDOUT\s0 \s-1ETOOMANYREFS\s0 | |
1863 | \&\s-1ETXTBSY\s0 \s-1EUSERS\s0 \s-1EWOULDBLOCK\s0 \s-1EXDEV\s0 | |
1864 | .SH "FCNTL" | |
1865 | .IX Header "FCNTL" | |
1866 | .IP "Constants" 8 | |
1867 | .IX Item "Constants" | |
1868 | \&\s-1FD_CLOEXEC\s0 F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY | |
1869 | .SH "FLOAT" | |
1870 | .IX Header "FLOAT" | |
1871 | .IP "Constants" 8 | |
1872 | .IX Item "Constants" | |
1873 | \&\s-1DBL_DIG\s0 \s-1DBL_EPSILON\s0 \s-1DBL_MANT_DIG\s0 \s-1DBL_MAX\s0 \s-1DBL_MAX_10_EXP\s0 \s-1DBL_MAX_EXP\s0 \s-1DBL_MIN\s0 \s-1DBL_MIN_10_EXP\s0 \s-1DBL_MIN_EXP\s0 \s-1FLT_DIG\s0 \s-1FLT_EPSILON\s0 \s-1FLT_MANT_DIG\s0 \s-1FLT_MAX\s0 \s-1FLT_MAX_10_EXP\s0 \s-1FLT_MAX_EXP\s0 \s-1FLT_MIN\s0 \s-1FLT_MIN_10_EXP\s0 \s-1FLT_MIN_EXP\s0 \s-1FLT_RADIX\s0 \s-1FLT_ROUNDS\s0 \s-1LDBL_DIG\s0 \s-1LDBL_EPSILON\s0 \s-1LDBL_MANT_DIG\s0 \s-1LDBL_MAX\s0 \s-1LDBL_MAX_10_EXP\s0 \s-1LDBL_MAX_EXP\s0 \s-1LDBL_MIN\s0 \s-1LDBL_MIN_10_EXP\s0 \s-1LDBL_MIN_EXP\s0 | |
1874 | .SH "LIMITS" | |
1875 | .IX Header "LIMITS" | |
1876 | .IP "Constants" 8 | |
1877 | .IX Item "Constants" | |
1878 | \&\s-1ARG_MAX\s0 \s-1CHAR_BIT\s0 \s-1CHAR_MAX\s0 \s-1CHAR_MIN\s0 \s-1CHILD_MAX\s0 \s-1INT_MAX\s0 \s-1INT_MIN\s0 \s-1LINK_MAX\s0 \s-1LONG_MAX\s0 \s-1LONG_MIN\s0 \s-1MAX_CANON\s0 \s-1MAX_INPUT\s0 \s-1MB_LEN_MAX\s0 \s-1NAME_MAX\s0 \s-1NGROUPS_MAX\s0 \s-1OPEN_MAX\s0 \s-1PATH_MAX\s0 \s-1PIPE_BUF\s0 \s-1SCHAR_MAX\s0 \s-1SCHAR_MIN\s0 \s-1SHRT_MAX\s0 \s-1SHRT_MIN\s0 \s-1SSIZE_MAX\s0 \s-1STREAM_MAX\s0 \s-1TZNAME_MAX\s0 \s-1UCHAR_MAX\s0 \s-1UINT_MAX\s0 \s-1ULONG_MAX\s0 \s-1USHRT_MAX\s0 | |
1879 | .SH "LOCALE" | |
1880 | .IX Header "LOCALE" | |
1881 | .IP "Constants" 8 | |
1882 | .IX Item "Constants" | |
1883 | \&\s-1LC_ALL\s0 \s-1LC_COLLATE\s0 \s-1LC_CTYPE\s0 \s-1LC_MONETARY\s0 \s-1LC_NUMERIC\s0 \s-1LC_TIME\s0 | |
1884 | .SH "MATH" | |
1885 | .IX Header "MATH" | |
1886 | .IP "Constants" 8 | |
1887 | .IX Item "Constants" | |
1888 | \&\s-1HUGE_VAL\s0 | |
1889 | .SH "SIGNAL" | |
1890 | .IX Header "SIGNAL" | |
1891 | .IP "Constants" 8 | |
1892 | .IX Item "Constants" | |
1893 | \&\s-1SA_NOCLDSTOP\s0 \s-1SA_NOCLDWAIT\s0 \s-1SA_NODEFER\s0 \s-1SA_ONSTACK\s0 \s-1SA_RESETHAND\s0 \s-1SA_RESTART\s0 | |
1894 | \&\s-1SA_SIGINFO\s0 \s-1SIGABRT\s0 \s-1SIGALRM\s0 \s-1SIGCHLD\s0 \s-1SIGCONT\s0 \s-1SIGFPE\s0 \s-1SIGHUP\s0 \s-1SIGILL\s0 \s-1SIGINT\s0 | |
1895 | \&\s-1SIGKILL\s0 \s-1SIGPIPE\s0 \s-1SIGQUIT\s0 \s-1SIGSEGV\s0 \s-1SIGSTOP\s0 \s-1SIGTERM\s0 \s-1SIGTSTP\s0 \s-1SIGTTIN\s0 \s-1SIGTTOU\s0 | |
1896 | \&\s-1SIGUSR1\s0 \s-1SIGUSR2\s0 \s-1SIG_BLOCK\s0 \s-1SIG_DFL\s0 \s-1SIG_ERR\s0 \s-1SIG_IGN\s0 \s-1SIG_SETMASK\s0 | |
1897 | \&\s-1SIG_UNBLOCK\s0 | |
1898 | .SH "STAT" | |
1899 | .IX Header "STAT" | |
1900 | .IP "Constants" 8 | |
1901 | .IX Item "Constants" | |
1902 | S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR | |
1903 | .IP "Macros" 8 | |
1904 | .IX Item "Macros" | |
1905 | S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG | |
1906 | .SH "STDLIB" | |
1907 | .IX Header "STDLIB" | |
1908 | .IP "Constants" 8 | |
1909 | .IX Item "Constants" | |
1910 | \&\s-1EXIT_FAILURE\s0 \s-1EXIT_SUCCESS\s0 \s-1MB_CUR_MAX\s0 \s-1RAND_MAX\s0 | |
1911 | .SH "STDIO" | |
1912 | .IX Header "STDIO" | |
1913 | .IP "Constants" 8 | |
1914 | .IX Item "Constants" | |
1915 | \&\s-1BUFSIZ\s0 \s-1EOF\s0 \s-1FILENAME_MAX\s0 L_ctermid L_cuserid L_tmpname \s-1TMP_MAX\s0 | |
1916 | .SH "TIME" | |
1917 | .IX Header "TIME" | |
1918 | .IP "Constants" 8 | |
1919 | .IX Item "Constants" | |
1920 | \&\s-1CLK_TCK\s0 \s-1CLOCKS_PER_SEC\s0 | |
1921 | .SH "UNISTD" | |
1922 | .IX Header "UNISTD" | |
1923 | .IP "Constants" 8 | |
1924 | .IX Item "Constants" | |
1925 | R_OK \s-1SEEK_CUR\s0 \s-1SEEK_END\s0 \s-1SEEK_SET\s0 \s-1STDIN_FILENO\s0 \s-1STDOUT_FILENO\s0 \s-1STDERR_FILENO\s0 W_OK X_OK | |
1926 | .SH "WAIT" | |
1927 | .IX Header "WAIT" | |
1928 | .IP "Constants" 8 | |
1929 | .IX Item "Constants" | |
1930 | \&\s-1WNOHANG\s0 \s-1WUNTRACED\s0 | |
1931 | .RS 8 | |
1932 | .IP "\s-1WNOHANG\s0" 16 | |
1933 | .IX Item "WNOHANG" | |
1934 | Do not suspend the calling process until a child process | |
1935 | changes state but instead return immediately. | |
1936 | .IP "\s-1WUNTRACED\s0" 16 | |
1937 | .IX Item "WUNTRACED" | |
1938 | Catch stopped child processes. | |
1939 | .RE | |
1940 | .RS 8 | |
1941 | .RE | |
1942 | .IP "Macros" 8 | |
1943 | .IX Item "Macros" | |
1944 | \&\s-1WIFEXITED\s0 \s-1WEXITSTATUS\s0 \s-1WIFSIGNALED\s0 \s-1WTERMSIG\s0 \s-1WIFSTOPPED\s0 \s-1WSTOPSIG\s0 | |
1945 | .RS 8 | |
1946 | .IP "\s-1WIFEXITED\s0" 16 | |
1947 | .IX Item "WIFEXITED" | |
1948 | \&\s-1WIFEXITED\s0($?) returns true if the child process exited normally | |
1949 | (\f(CW\*(C`exit()\*(C'\fR or by falling off the end of \f(CW\*(C`main()\*(C'\fR) | |
1950 | .IP "\s-1WEXITSTATUS\s0" 16 | |
1951 | .IX Item "WEXITSTATUS" | |
1952 | \&\s-1WEXITSTATUS\s0($?) returns the normal exit status of the child process | |
1953 | (only meaningful if \s-1WIFEXITED\s0($?) is true) | |
1954 | .IP "\s-1WIFSIGNALED\s0" 16 | |
1955 | .IX Item "WIFSIGNALED" | |
1956 | \&\s-1WIFSIGNALED\s0($?) returns true if the child process terminated because | |
1957 | of a signal | |
1958 | .IP "\s-1WTERMSIG\s0" 16 | |
1959 | .IX Item "WTERMSIG" | |
1960 | \&\s-1WTERMSIG\s0($?) returns the signal the child process terminated for | |
1961 | (only meaningful if \s-1WIFSIGNALED\s0($?) is true) | |
1962 | .IP "\s-1WIFSTOPPED\s0" 16 | |
1963 | .IX Item "WIFSTOPPED" | |
1964 | \&\s-1WIFSTOPPED\s0($?) returns true if the child process is currently stopped | |
1965 | (can happen only if you specified the \s-1WUNTRACED\s0 flag to \fIwaitpid()\fR) | |
1966 | .IP "\s-1WSTOPSIG\s0" 16 | |
1967 | .IX Item "WSTOPSIG" | |
1968 | \&\s-1WSTOPSIG\s0($?) returns the signal the child process was stopped for | |
1969 | (only meaningful if \s-1WIFSTOPPED\s0($?) is true) | |
1970 | .RE | |
1971 | .RS 8 | |
1972 | .RE |