home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doc_soft / perlref.lzh / perlref.3 < prev    next >
Encoding:
Text File  |  1991-01-26  |  30.0 KB  |  1,277 lines

  1.  
  2. #!/bin/sh
  3. # this is perlref_shr.03 (part 3 of perlref3_44_0)
  4. # do not concatenate these parts, unpack them in order with /bin/sh
  5. # file refbase.ps continued
  6. #
  7. if test ! -r _shar_seq_.tmp; then
  8.     echo 'Please unpack part 1 first!'
  9.     exit 1
  10. fi
  11. (read Scheck
  12.  if test "$Scheck" != 3; then
  13.     echo Please unpack part "$Scheck" next!
  14.     exit 1
  15.  else
  16.     exit 0
  17.  fi
  18. ) < _shar_seq_.tmp || exit 1
  19. if test ! -f _shar_wnt_.tmp; then
  20.     echo 'x - still skipping refbase.ps'
  21. else
  22. echo 'x - continuing file refbase.ps'
  23. sed 's/^X//' << 'SHAR_EOF' >> 'refbase.ps' &&
  24. 537 169 gm
  25. (cmp)show
  26. 537 225 gm
  27. (String compare. Returns -1, 0 or 1.)show
  28. 552 169 gm
  29. (= ~)show
  30. 552 197 gm
  31. (! ~)show
  32. 552 225 gm
  33. (Search pattern, substitution, or translation \(negated\).)show
  34. 567 169 gm
  35. 1 fs
  36. bu fc
  37. 2 F /|______Times-Bold fnt
  38. bn
  39. (. .)show
  40. 567 225 gm
  41. 0 fs
  42. bu fc
  43. 2 F /|______Times-Roman fnt
  44. bn
  45. (Enumeration, also input line range operator.)show
  46. 582 169 gm
  47. 1 fs
  48. bu fc
  49. 2 F /|______Times-Bold fnt
  50. bn
  51. (,)show
  52. 582 225 gm
  53. 0 fs
  54. bu fc
  55. 2 F /|______Times-Roman fnt
  56. bn
  57. (Comma operator.)show
  58. 619 169 gm
  59. 1 fs
  60. 18 fz
  61. bu fc
  62. 2 F /|______Times-Bold fnt
  63. bn
  64. (7. File test operators)show
  65. 639 169 gm
  66. 0 fs
  67. 12 fz
  68. bu fc
  69. 2 F /|______Times-Roman fnt
  70. bn
  71. (These unary operators takes one argument, either a filename or a filehandle,)show
  72. 653 169 gm
  73. (and tests the associated file to see if something is true about it. If the argument)show
  74. 667 169 gm
  75. (is omitted, tests $_ \(except for -t, which tests STDIN\). If the special argument)show
  76. 681 169 gm
  77. (_ \(underscore\) is passed, uses the info of the preceding test.)show
  78. 698 169 gm
  79. (\320r /\320w /\320x /\320o        File is readable/writable/executable/owned by effective uid.)show
  80. 715 169 gm
  81. (\320R /\320W /\320X /\320O    File is readable/writable/executable/owned by real uid.)show
  82. 732 169 gm
  83. (\320e /\320z /\320s)show
  84. 732 225 gm
  85. (File exists / has zero/non-zero size.)show
  86. 749 169 gm
  87. (\320f /\320d)show
  88. 749 225 gm
  89. (File is a plain file, a directory.)show
  90. 766 169 gm
  91. (\320l /\320S /\320p)show
  92. 766 225 gm
  93. (File is a symbolic link, a socket,  a named pipe \(FIFO\).)show
  94. 783 169 gm
  95. (\320b /\320c)show
  96. 783 225 gm
  97. (File is a block/character special file.)show
  98. 800 169 gm
  99. (\320u /\320g /\320k)show
  100. 800 225 gm
  101. (File has setuid/setgid/sticky bit set.)show
  102. 817 169 gm
  103. (\320t)show
  104. 817 225 gm
  105. (Tests if filehandle \(STDIN by default\) is opened to a tty.)show
  106. 834 169 gm
  107. (\320T /\320B)show
  108. 834 225 gm
  109. (File is a text/non-text \(binary\) file.  Both \320T and \320B return TRUE)show
  110. 848 225 gm
  111. (on a null file, or a file at EOF when testing a filehandle.)show
  112. 865 169 gm
  113. (\320M / \320A / \320C)show
  114. 879 225 gm
  115. (File creation / access / inode change time. Measured in days since)show
  116. 893 225 gm
  117. (this program started. See also \322$^T\323 in section \322Special)show
  118. 907 225 gm
  119. (Variables\323.)show
  120. F T cp
  121. %%Page: ? 5
  122. op
  123. 44 42 xl
  124. 1 1 pen
  125. 907 279 gm
  126. (nc 44 42 1212 844 6 rc)kp
  127. 122 169 gm
  128. 1 setTxMode
  129. 0 fs
  130. 12 fz
  131. bu fc
  132. 2 F /|______Times-Roman fnt
  133. bn
  134. (An * after the parameter list indicates that this function may be used either as a)show
  135. 136 169 gm
  136. (function or as a unary operator, without the parentheses.)show
  137. 153 169 gm
  138. (The symbol \240 after a parameter indicates that this parameter will default to $_)show
  139. 167 169 gm
  140. (if omitted.)show
  141. 204 169 gm
  142. 1 fs
  143. 18 fz
  144. bu fc
  145. 2 F /|______Times-Bold fnt
  146. bn
  147. (8. Arithmetic functions)show
  148. 224 169 gm
  149. 0 fs
  150. 12 fz
  151. bu fc
  152. 2 F /|______Times-Roman fnt
  153. bn
  154. (atan2\(Y,X\))show
  155. 238 197 gm
  156. (Returns the arctangent of Y/X in the range -)show
  157. currentfont SwToSym
  158. (p)show
  159. setfont
  160. (  to )show
  161. currentfont SwToSym
  162. (p)show
  163. setfont
  164. ( .)show
  165. 255 169 gm
  166. (cos\(EXPR\240\)*)show
  167. 269 197 gm
  168. (Returns the cosine of EXPR \(expressed in radians\).)show
  169. 286 169 gm
  170. (exp\(EXPR\240\)*)show
  171. 300 197 gm
  172. (Returns e to the power of EXPR.)show
  173. 317 169 gm
  174. (int\(EXPR\240\)*)show
  175. 331 197 gm
  176. (Returns the integer portion of EXPR.)show
  177. 348 169 gm
  178. (log\(EXPR\240\)*)show
  179. 362 197 gm
  180. (Returns natural logarithm \(base )show
  181. 2 fs
  182. bu fc
  183. 2 F /|______Times-Italic fnt
  184. bn
  185. (e)show
  186. 0 fs
  187. bu fc
  188. 2 F /|______Times-Roman fnt
  189. bn
  190. ( \) of EXPR.)show
  191. 379 169 gm
  192. (rand [\(EXPR\)*])show
  193. 393 197 gm
  194. (Returns a random fractional number between 0 and the value of EXPR.)show
  195. 407 197 gm
  196. (If EXPR is omitted, returns a value between 0 and 1.)show
  197. 424 169 gm
  198. (sin\(EXPR\240\)*)show
  199. 438 197 gm
  200. (Returns the sine of EXPR \(expressed in radians\).)show
  201. 455 169 gm
  202. (sqrt\(EXPR\240\)*)show
  203. 469 197 gm
  204. (Return the square root of EXPR.)show
  205. 486 169 gm
  206. (srand[\(EXPR\)*])show
  207. 500 197 gm
  208. (Sets the random number seed for the rand operator.)show
  209. 517 169 gm
  210. (time)show
  211. 517 197 gm
  212. (Returns the number of seconds since January 1, 1970. Suitable for)show
  213. 531 197 gm
  214. (feeding to gmtime\(...\) and localtime\(...\).)show
  215. 568 169 gm
  216. 1 fs
  217. 18 fz
  218. bu fc
  219. 2 F /|______Times-Bold fnt
  220. bn
  221. (9. Conversion functions)show
  222. 588 169 gm
  223. 0 fs
  224. 12 fz
  225. bu fc
  226. 2 F /|______Times-Roman fnt
  227. bn
  228. (gmtime\(EXPR\)*)show
  229. 602 197 gm
  230. (Converts a time as returned by the time function to a 9-element array)show
  231. 616 197 gm
  232. (\($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst\) with the)show
  233. 630 197 gm
  234. (time analyzed for the Greenwich timezone. $mon has the range 0..11 and)show
  235. 644 197 gm
  236. ($wday has the range 0..6.)show
  237. 661 169 gm
  238. (hex\(EXPR\240\)*)show
  239. 675 197 gm
  240. (Returns the decimal value of EXPR interpreted as an hex string.)show
  241. 692 169 gm
  242. (localtime\(EXPR\)*)show
  243. 706 197 gm
  244. (Converts a time as returned by the time function to a 9-element array)show
  245. 720 197 gm
  246. (with the time analyzed for the local timezone.)show
  247. 737 169 gm
  248. (oct\(EXPR\240\)*)show
  249. 751 197 gm
  250. (Returns the decimal value of EXPR interpreted as an octal string. If)show
  251. 765 197 gm
  252. (EXPR starts off with 0x, interprets it as a hex string instead.)show
  253. 782 169 gm
  254. (ord\(EXPR\240\)*)show
  255. 796 197 gm
  256. (Returns the ascii value of the first character of EXPR.)show
  257. 813 169 gm
  258. (vec\(EXPR,OFFSET,BITS\))show
  259. 827 197 gm
  260. (Treats EXPR as a string of unsigned ints, and yields the bit at OFFSET.)show
  261. 841 197 gm
  262. (BITS must be between 1 and 32. May be used as an lvalue.)show
  263. F T cp
  264. %%Page: ? 6
  265. op
  266. 44 42 xl
  267. 1 1 pen
  268. 841 480 gm
  269. (nc 44 42 1212 844 6 rc)kp
  270. 122 169 gm
  271. 1 setTxMode
  272. 0 fs
  273. 12 fz
  274. bu fc
  275. 2 F /|______Times-Roman fnt
  276. bn
  277. (A LIST is a \(possibly parenthesised\) list of expressions, variables or LISTs.)show
  278. 136 169 gm
  279. (An array variable or an array slice may always be used instead of a LIST.)show
  280. 173 169 gm
  281. 1 fs
  282. 18 fz
  283. bu fc
  284. 2 F /|______Times-Bold fnt
  285. bn
  286. (10. Structure conversion)show
  287. 193 169 gm
  288. 0 fs
  289. 12 fz
  290. bu fc
  291. 2 F /|______Times-Roman fnt
  292. bn
  293. (pack\(TEMPLATE,LIST\))show
  294. 207 197 gm
  295. (Packs the values into a binary structure using TEMPLATE.)show
  296. 224 169 gm
  297. (unpack\(TEMPLATE,EXPR\))show
  298. 238 197 gm
  299. (Unpacks the structure EXPR into an array, using TEMPLATE.)show
  300. 255 197 gm
  301. (TEMPLATE is a sequence of characters as follows:)show
  302. 272 228 gm
  303. (a)show
  304. 272 244 gm
  305. (/)show
  306. 272 258 gm
  307. (A)show
  308. 272 279 gm
  309. (Ascii string, null/space padded)show
  310. 289 228 gm
  311. (c)show
  312. 289 244 gm
  313. (/)show
  314. 289 258 gm
  315. (C)show
  316. 289 279 gm
  317. (Native/unsigned char value)show
  318. 306 228 gm
  319. (s)show
  320. 306 244 gm
  321. (/)show
  322. 306 258 gm
  323. (S)show
  324. 306 279 gm
  325. (Signed/unsigned short value)show
  326. 323 228 gm
  327. (i)show
  328. 323 244 gm
  329. (/)show
  330. 323 258 gm
  331. (I)show
  332. 323 279 gm
  333. (Signed/unsigned integer value)show
  334. 340 228 gm
  335. (l)show
  336. 340 244 gm
  337. (/)show
  338. 340 258 gm
  339. (L)show
  340. 340 279 gm
  341. (Signed/unsigned long value)show
  342. 357 228 gm
  343. (n)show
  344. 357 244 gm
  345. (/)show
  346. 357 258 gm
  347. (N)show
  348. 357 279 gm
  349. (Short/long in network byte order)show
  350. 374 228 gm
  351. (f)show
  352. 374 244 gm
  353. (/)show
  354. 374 258 gm
  355. (d)show
  356. 374 279 gm
  357. (Single/double float in native format)show
  358. 391 228 gm
  359. (b)show
  360. 391 244 gm
  361. (/)show
  362. 391 258 gm
  363. (B)show
  364. 391 279 gm
  365. (Bit string in ascending / descending order)show
  366. 408 228 gm
  367. (h)show
  368. 408 244 gm
  369. (/)show
  370. 408 258 gm
  371. (H)show
  372. 408 279 gm
  373. (Hex string, low / high nybble first.)show
  374. 425 228 gm
  375. (u)show
  376. 425 244 gm
  377. (/)show
  378. 425 258 gm
  379. (p)show
  380. 425 279 gm
  381. (Uuencoded string / Pointer to a string)show
  382. 442 228 gm
  383. (x)show
  384. 442 244 gm
  385. (/)show
  386. 442 258 gm
  387. (@)show
  388. 442 279 gm
  389. (Null byte / null fill until position)show
  390. 459 228 gm
  391. (X)show
  392. 459 279 gm
  393. (Backup a byte)show
  394. 476 169 gm
  395. (Each character may be followed by a decimal number which will be used as a)show
  396. 490 169 gm
  397. (repeat count, a \322*\323 specifies all remaining arguments.)show
  398. 504 169 gm
  399. (If the format is preceded with \322)show
  400. 2 fs
  401. bu fc
  402. 2 F /|______Times-Italic fnt
  403. bn
  404. (%n)show
  405. 0 fs
  406. bu fc
  407. 2 F /|______Times-Roman fnt
  408. bn
  409. (\323, \322unpack\323 returns an )show
  410. 2 fs
  411. bu fc
  412. 2 F /|______Times-Italic fnt
  413. bn
  414. (n)show
  415. 0 fs
  416. bu fc
  417. 2 F /|______Times-Roman fnt
  418. bn
  419. (-bit checksum)show
  420. 518 169 gm
  421. (instead.)show
  422. 532 169 gm
  423. (Spaces may be included in the template for readability purposes.)show
  424. 569 169 gm
  425. 1 fs
  426. 18 fz
  427. bu fc
  428. 2 F /|______Times-Bold fnt
  429. bn
  430. (11. String functions)show
  431. 589 169 gm
  432. 0 fs
  433. 12 fz
  434. bu fc
  435. 2 F /|______Times-Roman fnt
  436. bn
  437. (chop\(LIST\240\))show
  438. 603 197 gm
  439. (Chops off the last character on all elements of the list; returns the last)show
  440. 617 197 gm
  441. (chopped character. The parentheses may be omitted if LIST is a single)show
  442. 631 197 gm
  443. (variable.)show
  444. 648 169 gm
  445. (crypt\(PLAINTEXT,SALT\))show
  446. 662 197 gm
  447. (Encrypts a string.)show
  448. 679 169 gm
  449. (eval\(EXPR\240\)*)show
  450. 693 197 gm
  451. (EXPR is parsed and executed as if it were a little perl program. The)show
  452. 707 197 gm
  453. (value returned is the value of the last expression evaluated. If there is a)show
  454. 721 197 gm
  455. (syntax error or runtime error, an undefined string is returned by eval, and)show
  456. 735 197 gm
  457. ($@ is set to the error message.)show
  458. 752 169 gm
  459. (index\(STR,SUBSTR[,OFFSET]\))show
  460. 766 197 gm
  461. (Returns the position of SUBSTR in STR at or after OFFSET. If the)show
  462. 780 197 gm
  463. (substring is not found, returns $[ \320 1.)show
  464. 797 169 gm
  465. (length\(EXPR\240\)*)show
  466. 811 197 gm
  467. (Returns the length in characters of the value of EXPR.)show
  468. 828 169 gm
  469. (rindex\(STR,SUBSTR[,OFFSET]\))show
  470. 842 197 gm
  471. (Returns the position of the last occurrence of SUBSTR in STR at or)show
  472. 856 197 gm
  473. (before OFFSET.)show
  474. 873 169 gm
  475. (substr\(EXPR,OFFSET[,LEN]\))show
  476. 887 197 gm
  477. (Extracts a substring out of EXPR and returns it. If OFFSET is negative,)show
  478. 901 197 gm
  479. (counts from the end of the string. May be used as an lvalue.)show
  480. F T cp
  481. %%Page: ? 7
  482. op
  483. 44 42 xl
  484. 1 1 pen
  485. 901 483 gm
  486. (nc 44 42 1212 844 6 rc)kp
  487. 125 169 gm
  488. 1 setTxMode
  489. 1 fs
  490. 18 fz
  491. bu fc
  492. 2 F /|______Times-Bold fnt
  493. bn
  494. (12. Array and list functions)show
  495. 145 169 gm
  496. 0 fs
  497. 12 fz
  498. bu fc
  499. 2 F /|______Times-Roman fnt
  500. bn
  501. (delete  $ARRAY{KEY})show
  502. 159 197 gm
  503. (Deletes the specified value from the specified associative array. Returns)show
  504. 173 197 gm
  505. (the deleted value.)show
  506. 190 169 gm
  507. (each\(%ARRAY\)*)show
  508. 204 197 gm
  509. (Returns a 2-element array consisting of the key and value for the next)show
  510. 218 197 gm
  511. (value of an associative array. Entries are returned in an apparently)show
  512. 232 197 gm
  513. (random order. When the array is entirely read, a null array is returned.)show
  514. 246 197 gm
  515. (The next call to each\(...\) after that will start iterating again.)show
  516. 263 169 gm
  517. (grep\(EXPR,LIST\))show
  518. 277 197 gm
  519. (Evaluates EXPR for each element of the LIST, locally setting $_ to refer)show
  520. 291 197 gm
  521. (to the element. Modifying $_ will modify the corresponding element)show
  522. 305 197 gm
  523. (from LIST. Returns array of elements from LIST for which EXPR)show
  524. 319 197 gm
  525. (returned true.)show
  526. 336 169 gm
  527. (join\(EXPR,LIST\))show
  528. 350 197 gm
  529. (Joins the separate strings of LIST into a single string with fields)show
  530. 364 197 gm
  531. (separated by the value of EXPR, and returns the string.)show
  532. 381 169 gm
  533. (keys\(%ARRAY\)*)show
  534. 395 197 gm
  535. (Returns a normal array consisting of all the keys of the named)show
  536. 409 197 gm
  537. (associative array.)show
  538. 426 169 gm
  539. (pop\(@ARRAY\)*)show
  540. 440 197 gm
  541. (Pops and returns the last value of the array, shortens the array by 1.)show
  542. 457 169 gm
  543. (push\(@ARRAY,LIST\))show
  544. 471 197 gm
  545. (Pushes the values of LIST onto the end of ARRAY. The length of)show
  546. 485 197 gm
  547. (ARRAY increases by the length of LIST.)show
  548. 502 169 gm
  549. (reverse\(LIST\)*)show
  550. 516 197 gm
  551. (In array context: returns the LIST in reverse order. In scalar context:)show
  552. 530 197 gm
  553. (returns the first element of LIST with bytes reversed.)show
  554. 547 169 gm
  555. (shift[\(@ARRAY\)*])show
  556. 561 197 gm
  557. (Shifts the first value of the array off and returns it, shortening the array)show
  558. 575 197 gm
  559. (by 1 and moving everything down. If @ARRAY is omitted, shifts)show
  560. 589 197 gm
  561. (@ARGV in main and @_ in subroutines.)show
  562. 606 169 gm
  563. (sort\([SUBROUTINE] LIST\)*)show
  564. 620 197 gm
  565. (Sorts the LIST and returns the sorted array value. If SUBROUTINE is)show
  566. 634 197 gm
  567. (specified, gives the name of a subroutine that returns less than zero, zero,)show
  568. 648 197 gm
  569. (or greater than zero, depending on how the elements of the array,)show
  570. 662 197 gm
  571. (available to the routine as $a and $b, are to be ordered.)show
  572. 679 169 gm
  573. (splice\(@ARRAY,OFFSET[,LENGTH[,LIST]]\))show
  574. 693 197 gm
  575. (Removes the elements of @ARRAY designated by OFFSET and)show
  576. 707 197 gm
  577. (LENGTH, and replaces them with LIST \(if specified\).)show
  578. 721 197 gm
  579. (Returns the elements removed.)show
  580. 738 169 gm
  581. (split[\(/PATTERN/[,EXPR\240[,LIMIT]]\)])show
  582. 752 197 gm
  583. (Splits a string into an array of strings, and returns it. If LIMIT is)show
  584. 766 197 gm
  585. (specified, splits in no more than that many fields. If PATTERN is also)show
  586. 780 197 gm
  587. (omitted, splits on whitespace \(/[)show
  588. 780 351 gm
  589. (\\)show
  590. 780 355 gm
  591. (t)show
  592. 780 360 gm
  593. (\\)show
  594. 780 364 gm
  595. (n)show
  596. 780 371 gm
  597. (])show
  598. 780 376 gm
  599. (+/\). If not in array context: returns)show
  600. 794 197 gm
  601. (number of fields and splits to @_ .)show
  602. 811 169 gm
  603. (unshift\(@ARRAY,LIST\))show
  604. 825 197 gm
  605. (Prepends list to the front of the array, and returns the number of elements)show
  606. 839 197 gm
  607. (in the new array.)show
  608. 856 169 gm
  609. (values\(%ARRAY\)*)show
  610. 870 197 gm
  611. (Returns a normal array consisting of all the values of the named)show
  612. 884 197 gm
  613. (associative array.)show
  614. F T cp
  615. %%Page: ? 8
  616. op
  617. 44 42 xl
  618. 1 1 pen
  619. 884 280 gm
  620. (nc 44 42 1212 844 6 rc)kp
  621. 125 169 gm
  622. 1 setTxMode
  623. 1 fs
  624. 18 fz
  625. bu fc
  626. 2 F /|______Times-Bold fnt
  627. bn
  628. (13. File operations)show
  629. 145 169 gm
  630. 0 fs
  631. 12 fz
  632. bu fc
  633. 2 F /|______Times-Roman fnt
  634. bn
  635. (Functions operating on a list of files return the number of files successfully)show
  636. 159 169 gm
  637. (operated upon.)show
  638. 176 169 gm
  639. (chmod\(LIST\)*)show
  640. 190 197 gm
  641. (Changes the permissions of a list of files. The first element of the list)show
  642. 204 197 gm
  643. (must be the numerical mode.)show
  644. 221 169 gm
  645. (chown\(LIST\)*)show
  646. 235 197 gm
  647. (Changes the owner and group of a list of files. The first two elements of)show
  648. 249 197 gm
  649. (the list must be the numerical uid and gid.)show
  650. 266 169 gm
  651. (truncate\(FILE,SIZE\))show
  652. 280 197 gm
  653. (truncates FILE to SIZE. FILE may be a filename or a filehandle.)show
  654. 297 169 gm
  655. (link\(OLDFILE,NEWFILE\))show
  656. 311 197 gm
  657. (Creates a new filename linked to the old filename.)show
  658. 328 169 gm
  659. (lstat\(FILE\))show
  660. 342 197 gm
  661. (Like stat, but does not traverse a final symbolic link.)show
  662. 359 169 gm
  663. (mkdir\(DIR,MODE\))show
  664. 373 197 gm
  665. (Creates a directory with given permissions. Sets $! on failure.)show
  666. 390 169 gm
  667. (select\(RBITS,WBITS,NBITS,TIMEOUT\))show
  668. 404 197 gm
  669. (Performs a select\(2\) system call with the same parameters.)show
  670. 421 169 gm
  671. (readlink\(EXPR\240\)*)show
  672. 435 197 gm
  673. (Returns the value of a symbolic link.)show
  674. 452 169 gm
  675. (rename\(OLDNAME,NEWNAME\))show
  676. 466 197 gm
  677. (Changes the name of a file.)show
  678. 483 169 gm
  679. (rmdir\(FILENAME\240\)*)show
  680. 497 197 gm
  681. (Deletes the directory if it is empty. Sets $! on failure.)show
  682. 514 169 gm
  683. (stat\(FILE\))show
  684. 528 197 gm
  685. ( Returns a 13-element array \($dev, $ino, $mode, $nlink, $uid, $gid,)show
  686. 542 197 gm
  687. ($rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks\). FILE can be a)show
  688. 556 197 gm
  689. (filehandle, an expression evaluating to a filename, or _ to refer to the last)show
  690. 570 197 gm
  691. (file test operation.)show
  692. 587 169 gm
  693. (symlink\(OLDFILE,NEWFILE\))show
  694. 601 197 gm
  695. (Creates a new filename symbolically linked to the old filename.)show
  696. 618 169 gm
  697. (unlink\(LIST\)*)show
  698. 632 197 gm
  699. (Deletes a list of files.)show
  700. 649 169 gm
  701. (utime\(LIST\)*)show
  702. 663 197 gm
  703. (Changes the access and modification times. The first two elements of the)show
  704. 677 197 gm
  705. (list must be the numerical access and modification times.)show
  706. 714 169 gm
  707. 1 fs
  708. 18 fz
  709. bu fc
  710. 2 F /|______Times-Bold fnt
  711. bn
  712. (14. Directory reading routines)show
  713. 734 169 gm
  714. 0 fs
  715. 12 fz
  716. bu fc
  717. 2 F /|______Times-Roman fnt
  718. bn
  719. (closedir\(DIRHANDLE\)*)show
  720. 748 197 gm
  721. (Closes a directory opened by opendir.)show
  722. 765 169 gm
  723. (opendir\(DIRHANDLE,DIRNAME\))show
  724. 779 197 gm
  725. (Opens a directory on the handle specified.)show
  726. 796 169 gm
  727. (readdir\(DIRHANDLE\)*)show
  728. 810 197 gm
  729. (Returns the next entry \(or an array of entries\) in the directory.)show
  730. 827 169 gm
  731. (rewinddir\(DIRHANDLE\)*)show
  732. 841 197 gm
  733. (Positions the directory to the beginning.)show
  734. 858 169 gm
  735. (seekdir\(DIRHANDLE,POS\))show
  736. 872 197 gm
  737. (Sets position for readdir on the directory.)show
  738. 889 169 gm
  739. (telldir\(DIRHANDLE\)*)show
  740. 903 197 gm
  741. (Returns the postion in the directory.)show
  742. F T cp
  743. %%Page: ? 9
  744. op
  745. 44 42 xl
  746. 1 1 pen
  747. 903 369 gm
  748. (nc 44 42 1212 844 6 rc)kp
  749. 125 169 gm
  750. 1 setTxMode
  751. 1 fs
  752. 18 fz
  753. bu fc
  754. 2 F /|______Times-Bold fnt
  755. bn
  756. (15. Input / Output)show
  757. 145 169 gm
  758. 0 fs
  759. 12 fz
  760. bu fc
  761. 2 F /|______Times-Roman fnt
  762. bn
  763. (In input/output operations, FILEHANDLE may be a filehandle as opened by)show
  764. 159 169 gm
  765. (the \322open\323 operator, or a scalar variable which evaluates to the name of a)show
  766. 173 169 gm
  767. (filehandle to be used.)show
  768. 190 169 gm
  769. (binmode\(FILEHANDLE\)*)show
  770. 204 197 gm
  771. (Arranges for the file opened on FILEHANDLE to be read in \322binary\323)show
  772. 218 197 gm
  773. (mode as opposed to \322text\323 mode \(MS-DOS only\).)show
  774. 235 169 gm
  775. (close\(FILEHANDLE\)*)show
  776. 249 197 gm
  777. (Closes the file or pipe associated with the file handle.)show
  778. 266 169 gm
  779. (dbmclose\(%ARRAY\)*)show
  780. 280 197 gm
  781. (Breaks the binding between the array and the dbm file.)show
  782. 297 169 gm
  783. (dbmopen\(%ARRAY,DBMNAME, MODE\))show
  784. 311 197 gm
  785. (Binds a dbm or ndbm file to the associative array. If the database does)show
  786. 325 197 gm
  787. (not exist, it is created with the indicated mode.)show
  788. 342 169 gm
  789. (eof\(FILEHANDLE\))show
  790. 356 197 gm
  791. (Returns 1 if the next read will return end of file, or if the file is not open.)show
  792. 373 169 gm
  793. (eof)show
  794. 373 197 gm
  795. (Returns the eof status for the last file read.)show
  796. 390 169 gm
  797. (eof\( \))show
  798. 404 197 gm
  799. (Indicates eof on the pseudo file formed of the files listed on the)show
  800. 418 197 gm
  801. (command line.)show
  802. 435 169 gm
  803. (fcntl\(FILEHANDLE,FUNCTION,$VAR\))show
  804. 449 197 gm
  805. (Implements the fcntl\(2\) function. This function has non-standard return)show
  806. 463 197 gm
  807. (values. See the manual for details.)show
  808. 480 169 gm
  809. (fileno\(FILEHANDLE\)*)show
  810. 494 197 gm
  811. (Returns the file descriptor for a given \(open\) file.)show
  812. 511 169 gm
  813. (flock\(FILEHANDLE,OPERATION\))show
  814. 525 197 gm
  815. (Calls flock\(2\) on the file. OPERATION adds from 1 \(shared\), 2)show
  816. 539 197 gm
  817. (\(exclusive\), 4 \(non-blocking\) or 8 \(unlock\).)show
  818. 556 169 gm
  819. (getc[\(FILEHANDLE\)*])show
  820. 570 197 gm
  821. (Yields the next character from the file, or NULL on EOF. If)show
  822. 584 197 gm
  823. (FILEHANDLE is omitted, reads from STDIN.)show
  824. 601 169 gm
  825. (ioctl\(FILEHANDLE,FUNCTION,$VAR\))show
  826. 615 197 gm
  827. (performs ioctl\(2\) on the file. This function has non-standard return)show
  828. 629 197 gm
  829. (values. See the manual for details.)show
  830. 646 169 gm
  831. (open\(FILEHANDLE[,FILENAME]\))show
  832. 660 197 gm
  833. (Opens a file and associates it with FILEHANDLE. If FILENAME is)show
  834. 674 197 gm
  835. (omitted, the scalar variable of the same name as the FILEHANDLE must)show
  836. 688 197 gm
  837. (contain the filename.  The filename may be optionally preceded by \322>\323,)show
  838. 702 197 gm
  839. (\322> >\323 or \322<\323 to select output/append/input mode. Default mode is input.)show
  840. 716 197 gm
  841. (Precede with \322+\323 to select read/write access. Use \322&...\323 to connect to an)show
  842. 730 197 gm
  843. (already opened filehandle. Pipes to/from commands may be opened with)show
  844. 744 197 gm
  845. (\322|...\323 and \322...|\323 . Open returns 1 upon success, undef otherwise, except for)show
  846. 758 197 gm
  847. (pipes. The parentheses may be omitted, if only a FILEHANDLE is)show
  848. 772 197 gm
  849. (specified.)show
  850. 789 169 gm
  851. (pipe\(READHANDLE,WRITEHANDLE\))show
  852. 803 197 gm
  853. (Returns a pair of connected pipes.)show
  854. 820 169 gm
  855. (print[\([FILEHANDLE] LIST\240\)*])show
  856. 834 197 gm
  857. (Prints a string or a comma-separated list of strings. If FILEHANDLE is)show
  858. 848 197 gm
  859. (omitted, prints by default to standard output \(or to the last selected)show
  860. 862 197 gm
  861. (output channel - see select\(...\)\).)show
  862. 879 169 gm
  863. (printf[\([FILEHANDLE] LIST\)*])show
  864. 893 197 gm
  865. (Equivalent to \322print FILEHANDLE sprintf\(LIST\)\323.)show
  866. F T cp
  867. %%Page: ? 10
  868. op
  869. 44 42 xl
  870. 1 1 pen
  871. 893 445 gm
  872. (nc 44 42 1212 844 6 rc)kp
  873. 122 169 gm
  874. 1 setTxMode
  875. 0 fs
  876. 12 fz
  877. bu fc
  878. 2 F /|______Times-Roman fnt
  879. bn
  880. (read\(FILEHANDLE,$VAR,LENGTH[,OFFSET]\))show
  881. 136 197 gm
  882. (Read LENGTH binary bytes from the file into the variable at OFFSET.)show
  883. 150 197 gm
  884. (Returns number of bytes actually read.)show
  885. 167 169 gm
  886. (seek\(FILEHANDLE,POSITION,WHENCE\))show
  887. 181 197 gm
  888. (Randomly positions the file. Returns 1 upon success, 0 otherwise.)show
  889. 198 169 gm
  890. (select\(FILEHANDLE\)*)show
  891. 212 197 gm
  892. (Sets the current default filehandle for output operations. Returns the)show
  893. 226 197 gm
  894. (previously selected filehandle.)show
  895. 243 169 gm
  896. (sprintf\(FORMAT,LIST\))show
  897. 257 197 gm
  898. (Returns a string formatted by \(almost all of\) the usual printf conventions.)show
  899. 274 169 gm
  900. (sysread\(FILEHANDLE,$VAR,LENGTH[,OFFSET]\))show
  901. 288 197 gm
  902. (Reads LENGTH bytes into $VAR at OFFSET.)show
  903. 305 169 gm
  904. (syswrite\(FILEHANDLE,SCALAR,LENGTH[,OFFSET]\))show
  905. 319 197 gm
  906. (Writes LENGTH bytes from SCALAR at OFFSET.)show
  907. 336 169 gm
  908. (tell[\(FILEHANDLE\)]*)show
  909. 350 197 gm
  910. (Returns the current file position for the file. If FILEHANDLE is omitted,)show
  911. 364 197 gm
  912. (assumes the file last read.)show
  913. 381 169 gm
  914. (write[\(FILEHANDLE\)]*)show
  915. 395 197 gm
  916. (Writes a formatted record to the specified file, using the format)show
  917. 409 197 gm
  918. (associated with that file. See Formats.)show
  919. 446 169 gm
  920. 1 fs
  921. 18 fz
  922. bu fc
  923. 2 F /|______Times-Bold fnt
  924. bn
  925. (16. Search and replace functions)show
  926. 466 169 gm
  927. 0 fs
  928. 12 fz
  929. bu fc
  930. 2 F /|______Times-Roman fnt
  931. bn
  932. ([EXPR =~] [m]/PATTERN/[i][o])show
  933. 480 197 gm
  934. (Searches EXPR \(default: $_\) for a pattern. If you prepend an \322m\323 you)show
  935. 494 197 gm
  936. (can use almost any pair of characters as delimiters. If used in array)show
  937. 508 197 gm
  938. (context, an array is returned consisting of the subexpressions matched by)show
  939. 522 197 gm
  940. (the parentheses in pattern, i.e. \($1,\312$2,\312$3...\).)show
  941. 536 197 gm
  942. (Optional modifiers: \322i\323 searches in a case-insensitive manner;)show
  943. 550 197 gm
  944. (\322o\323\312interpolates variables only once.)show
  945. 567 169 gm
  946. (?PATTERN?)show
  947. 581 197 gm
  948. (This is just like the /pattern/ search, except that it matches only once)show
  949. 595 197 gm
  950. (between calls to the reset operator.)show
  951. 612 169 gm
  952. ([$VAR =~] s/PATTERN/REPLACEMENT/[g][i][e][o])show
  953. 626 197 gm
  954. (Searches a string for a pattern, and if found, replaces that pattern with)show
  955. 640 197 gm
  956. (the replacement text and returns the number of substitutions made.)show
  957. 654 197 gm
  958. (Otherwise it returns false.)show
  959. 668 197 gm
  960. (Optional modifiers: \322g\323 replaces all occurrences of the pattern;)show
  961. 682 197 gm
  962. (\322e\323\312interprets the replacement string as an expression; \322i\323 and \322o\323 as)show
  963. 696 197 gm
  964. (with /PATTERN/ matching. Any delimiter may replace the slashes; if)show
  965. 710 197 gm
  966. (single quotes are used, no interpretation is done on the replacement)show
  967. 724 197 gm
  968. (string.)show
  969. 741 169 gm
  970. (study[\($VAR\240\)*])show
  971. 755 197 gm
  972. (Study the contents of $VAR in anticipation of doing many pattern)show
  973. 769 197 gm
  974. (matches on the contents before it is next modified.)show
  975. 786 169 gm
  976. ([$VAR =~] tr/SEARCHLIST/REPLACEMENTLIST/[c][d][s])show
  977. 800 197 gm
  978. (Translates all occurrences of the characters found in the search list with)show
  979. 814 197 gm
  980. (the corresponding character in the replacement list. It returns the number)show
  981. 828 197 gm
  982. (of characters replaced. \322y\323 may be used instead of \322tr\323.)show
  983. 842 197 gm
  984. (Optional modifiers: \322c\323 complements the SEARCHLIST; \322d\323 deletes all)show
  985. 856 197 gm
  986. (characters not found in SEARCHLIST; \322s\323 squeezes all sequences of)show
  987. 870 197 gm
  988. (characters that are translated into the same target character into one)show
  989. 884 197 gm
  990. (occurrence of this character.)show
  991. F T cp
  992. %%Page: ? 11
  993. op
  994. 44 42 xl
  995. 1 1 pen
  996. 884 332 gm
  997. (nc 44 42 1212 844 6 rc)kp
  998. 125 169 gm
  999. 1 setTxMode
  1000. 1 fs
  1001. 18 fz
  1002. bu fc
  1003. 2 F /|______Times-Bold fnt
  1004. bn
  1005. (17. System interaction)show
  1006. 145 169 gm
  1007. 0 fs
  1008. 12 fz
  1009. bu fc
  1010. 2 F /|______Times-Roman fnt
  1011. bn
  1012. (alarm\(EXPR\)*)show
  1013. 159 197 gm
  1014. (Schedules a SIGALRM to be delivered after EXPR seconds.)show
  1015. 176 169 gm
  1016. (chdir [\(EXPR\)*])show
  1017. 190 197 gm
  1018. (Changes the working directory, $HOME if EXPR is omitted.)show
  1019. 207 169 gm
  1020. (chroot\(FILENAME\240\)*)show
  1021. 221 197 gm
  1022. (Changes the root directory for the the process and its children.)show
  1023. 238 169 gm
  1024. (die[\(LIST\)*])show
  1025. 252 197 gm
  1026. (Prints the value of LIST to STDERR and exits with the current value of)show
  1027. 266 197 gm
  1028. ($! \(errno\). If $! is 0, exits with the value of \($? >> 8\) \(\312`command `)show
  1029. 280 197 gm
  1030. (status\). If \($? >> 8\) is 0, exits with 255. LIST defaults to "Died.".)show
  1031. 297 169 gm
  1032. (exec\(LIST\)*)show
  1033. 311 197 gm
  1034. (Executes the system command in LIST; does not return.)show
  1035. 328 169 gm
  1036. (exit\(EXPR\)*)show
  1037. 342 197 gm
  1038. (Exits immediately with the value of EXPR.)show
  1039. 359 169 gm
  1040. (fork)show
  1041. 359 197 gm
  1042. (Does a fork\( \) call. Returns the child pid to the parent process and zero to)show
  1043. 373 197 gm
  1044. (the child process.)show
  1045. 390 169 gm
  1046. (getlogin)show
  1047. 404 197 gm
  1048. (Returns the current login name from /etc/utmp.)show
  1049. 421 169 gm
  1050. (getpgrp[\(PID\)*])show
  1051. 435 197 gm
  1052. (Returns the process group for process PID \(0, or omitted,  means the)show
  1053. 449 197 gm
  1054. (current process\).)show
  1055. 466 169 gm
  1056. (getppid)show
  1057. 480 197 gm
  1058. (Returns the process id of the parent process.)show
  1059. 497 169 gm
  1060. (getpriority\(WHICH,WHO\))show
  1061. 511 197 gm
  1062. (Returns the current priority for a process, process group, or user.)show
  1063. 528 169 gm
  1064. (kill\(LIST\)*)show
  1065. 542 197 gm
  1066. (Sends a signal to a list of processes. The first element of the list must be)show
  1067. 556 197 gm
  1068. (the signal to send \(numeric, or its name as a string\).)show
  1069. 573 169 gm
  1070. (setpgrp\(PID,PGRP\))show
  1071. 587 197 gm
  1072. (Sets the process group for the PID \(0 = current process\).)show
  1073. 604 169 gm
  1074. (setpriority\(WHICH,WHO,PRIO\))show
  1075. 618 197 gm
  1076. (Sets the current priority for a process, process group, or a user.)show
  1077. 635 169 gm
  1078. (sleep[\(EXPR\)*])show
  1079. 649 197 gm
  1080. (Causes the script to sleep for EXPR seconds, or forever if no EXPR.)show
  1081. 663 197 gm
  1082. (Returns the number of seconds actually slept.)show
  1083. 680 169 gm
  1084. (syscall\(LIST\)*)show
  1085. 694 197 gm
  1086. (Calls the system call specified in the first element of the list, passing the)show
  1087. 708 197 gm
  1088. (rest of the list as arguments to the call.)show
  1089. 725 169 gm
  1090. (system\(LIST\)*)show
  1091. 739 197 gm
  1092. (Does exactly the same thing as \322exec LIST\323 except that a fork is done)show
  1093. 753 197 gm
  1094. (first, and the parent process waits for the child process to complete.)show
  1095. 770 169 gm
  1096. (times)show
  1097. 784 197 gm
  1098. (Returns a 4-element array \($user, $system, $cuser, $csystem\) giving the)show
  1099. 798 197 gm
  1100. (user and system times, in seconds, for this process and the children of)show
  1101. 812 197 gm
  1102. (this process.)show
  1103. 829 169 gm
  1104. (umask[\(EXPR\)*])show
  1105. 843 197 gm
  1106. (Sets the umask for the process and returns the old one. If EXPR is)show
  1107. 857 197 gm
  1108. (omitted, returns current umask value.)show
  1109. 874 169 gm
  1110. (wait)show
  1111. 874 197 gm
  1112. (Waits for a child process to terminate and returns the pid of the deceased)show
  1113. 888 197 gm
  1114. (process \(-1 if none\). The status is returned in $? .)show
  1115. F T cp
  1116. %%Page: ? 12
  1117. op
  1118. 44 42 xl
  1119. 1 1 pen
  1120. 888 432 gm
  1121. (nc 44 42 1212 844 6 rc)kp
  1122. 122 169 gm
  1123. 1 setTxMode
  1124. 0 fs
  1125. 12 fz
  1126. bu fc
  1127. 2 F /|______Times-Roman fnt
  1128. bn
  1129. (waitpid\(PID,FLAGS\))show
  1130. 136 197 gm
  1131. (Performs the same function as the correcponding system call.)show
  1132. 153 169 gm
  1133. (warn\(LIST\)*)show
  1134. 167 197 gm
  1135. (Prints the message on STDERR like die\(...\), but doesn\325t exit.)show
  1136. 204 169 gm
  1137. 1 fs
  1138. 18 fz
  1139. bu fc
  1140. 2 F /|______Times-Bold fnt
  1141. bn
  1142. (18. Networking)show
  1143. 223 169 gm
  1144. 0 fs
  1145. 12 fz
  1146. bu fc
  1147. 2 F /|______Times-Roman fnt
  1148. bn
  1149. (accept\(NEWSOCKET,GENERICSOCKET\))show
  1150. 236 197 gm
  1151. (Accepts a new socket.)show
  1152. 252 169 gm
  1153. (bind\(SOCKET,NAME\))show
  1154. 265 197 gm
  1155. (Binds the NAME to the SOCKET.)show
  1156. 281 169 gm
  1157. (connect\(SOCKET, NAME\))show
  1158. 294 197 gm
  1159. (Connects the NAME to the SOCKET.)show
  1160. 310 169 gm
  1161. (getpeername\(SOCKET\))show
  1162. 323 197 gm
  1163. (Returns the socket address of the other end of the SOCKET.)show
  1164. 339 169 gm
  1165. (getsockname\(SOCKET\))show
  1166. 352 197 gm
  1167. (Returns the name of the socket.)show
  1168. 368 169 gm
  1169. (getsockopt\(SOCKET,LEVEL,OPTNAME\))show
  1170. 381 197 gm
  1171. (Returns the socket options.)show
  1172. 397 169 gm
  1173. (listen\(SOCKET,QUEUESIZE\))show
  1174. 410 197 gm
  1175. (Starts listening on the specified SOCKET.)show
  1176. 426 169 gm
  1177. (recv\(SOCKET,SCALAR,LENGTH,FLAGS\))show
  1178. 439 197 gm
  1179. (Receives a message on SOCKET.)show
  1180. 455 169 gm
  1181. (send\(SOCKET,MSG,FLAGS[,TO]\))show
  1182. 468 197 gm
  1183. (Sends a message on the SOCKET.)show
  1184. 484 169 gm
  1185. (setsockopt\(SOCKET,LEVEL,OPTNAME,OPTVAL\))show
  1186. 497 197 gm
  1187. (Sets the requested socket option.)show
  1188. 513 169 gm
  1189. (shutdown\(SOCKET,HOW\))show
  1190. 526 197 gm
  1191. (Shuts down a SOCKET.)show
  1192. 542 169 gm
  1193. (socket\(SOCKET,DOMAIN,TYPE,PROTOCOL\))show
  1194. 555 197 gm
  1195. (Creates a SOCKET in DOMAIN with TYPE and PROTOCOL.)show
  1196. 571 169 gm
  1197. (socketpair\(SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL\))show
  1198. 584 197 gm
  1199. (As socket, but creates a pair of bi-directional sockets.)show
  1200. 621 169 gm
  1201. 1 fs
  1202. 18 fz
  1203. bu fc
  1204. 2 F /|______Times-Bold fnt
  1205. bn
  1206. (19. SystemV IPC)show
  1207. 641 169 gm
  1208. 0 fs
  1209. 12 fz
  1210. bu fc
  1211. 2 F /|______Times-Roman fnt
  1212. bn
  1213. (The following functions all perform the same action as the corresponding)show
  1214. 655 169 gm
  1215. (system calls.)show
  1216. 672 169 gm
  1217. (msgctl\(ID,CMD,ARGS\))show
  1218. 689 169 gm
  1219. (msgget\(KEY,FLAGS\))show
  1220. 706 169 gm
  1221. (msgsnd\(ID,MSG,FLAGS\))show
  1222. 723 169 gm
  1223. (msgrcv\(ID,VAR,SIZE,TYPE,FLAGS\))show
  1224. 740 169 gm
  1225. (semctl\(ID,SEMNUM,CMD,ARG\))show
  1226. 757 169 gm
  1227. (semget\(KEY,NSEMS,SIZE,FLAGS\))show
  1228. 774 169 gm
  1229. (semop\(KEY,...\))show
  1230. 791 169 gm
  1231. (shmctl\(ID,CMD,ARG\))show
  1232. 808 169 gm
  1233. (shmget\(KEY,SIZE,FLAGS\))show
  1234. 825 169 gm
  1235. (shmread\(ID,VAR,POS,SIZE\))show
  1236. 842 169 gm
  1237. (shmwrite\(ID,STRING,POS,SIZE\))show
  1238. F T cp
  1239. %%Page: ? 13
  1240. op
  1241. 44 42 xl
  1242. 1 1 pen
  1243. 842 333 gm
  1244. (nc 44 42 1212 844 6 rc)kp
  1245. 125 169 gm
  1246. 1 setTxMode
  1247. 1 fs
  1248. 18 fz
  1249. bu fc
  1250. 2 F /|______Times-Bold fnt
  1251. bn
  1252. (20. Miscellaneous)show
  1253. 145 169 gm
  1254. 0 fs
  1255. 12 fz
  1256. bu fc
  1257. 2 F /|______Times-Roman fnt
  1258. bn
  1259. (caller[\(EXPR\)])show
  1260. 159 197 gm
  1261. (Returns an array \($package,$file,$line,\311\) for a specific subroutine call.)show
  1262. 173 197 gm
  1263. SHAR_EOF
  1264. true || echo 'restore of refbase.ps failed'
  1265. fi
  1266. echo 'End of perlref3_44_0 part 3'
  1267. echo 'File refbase.ps is continued in part 4'
  1268. echo 4 > _shar_seq_.tmp
  1269. exit 0
  1270. -- 
  1271. Johan Vromans                       jv@mh.nl via internet backbones
  1272. Multihouse Automatisering bv               uucp: ..!{uunet,hp4nl}!mh.nl!jv
  1273. Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
  1274. ------------------------ "Arms are made for hugging" -------------------------
  1275.  
  1276.  
  1277.