home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / PERL / PERL-4.036 / PERL-4 / perl-4.036 / Info / perl.info-6 < prev    next >
Encoding:
GNU Info File  |  1994-07-08  |  45.7 KB  |  1,369 lines

  1. This is Info file perl.info, produced by Makeinfo-1.55 from the input
  2. file perltexi.
  3.  
  4.    This file documents perl, Practical Extraction and Report Language,
  5. and was originally based on Larry Wall's unix-style man page for perl.
  6.  
  7.    GNU Texinfo version adapted by Jeff Kellem
  8. <composer@Beyond.Dreams.ORG>.
  9.  
  10.    Copyright (C) 1989, 1990, 1991, 1992, 1993 Larry Wall Texinfo
  11. version Copyright (C) 1990, 1991, 1993 Jeff Kellem
  12.  
  13.    Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.    Permission is granted to copy and distribute modified versions of
  18. this manual under the conditions for verbatim copying, provided also
  19. that the sections entitled "GNU General Public License" and "Conditions
  20. for Using Perl" are included exactly as in the original, and provided
  21. that the entire resulting derived work is distributed under the terms
  22. of a permission notice identical to this one.
  23.  
  24.    Permission is granted to copy and distribute translations of this
  25. manual into another language, under the above conditions for modified
  26. versions, except that the section entitled "GNU General Public License"
  27. and this permission notice may be included in translations approved by
  28. the Free Software Foundation instead of in the original English.
  29.  
  30. 
  31. File: perl.info,  Node: Debugging,  Next: Setuid Scripts,  Prev: Style,  Up: Top
  32.  
  33. Debugging
  34. *********
  35.  
  36.    If you invoke *perl* with a `-d' switch, your script will be run
  37. under a debugging monitor.  It will halt before the first executable
  38. statement and ask you for a command, such as:
  39.  
  40. `h'
  41.      Prints out a help message.
  42.  
  43. `T'
  44.      Stack trace.
  45.  
  46. `s'
  47.      Single step.  Executes until it reaches the beginning of another
  48.      statement.
  49.  
  50. `n'
  51.      Next.  Executes over subroutine calls, until it reaches the
  52.      beginning of the next statement.
  53.  
  54. `f'
  55.      Finish.  Executes statements until it has finished the current
  56.      subroutine.
  57.  
  58. `c'
  59.      Continue.  Executes until the next breakpoint is reached.
  60.  
  61. `c LINE'
  62.      Continue to the specified line.  Inserts a one-time-only
  63.      breakpoint at the specified line.
  64.  
  65. `<CR>'
  66.      Repeat last `n' or `s'.
  67.  
  68. `n'
  69.      Single step around subroutine call.
  70.  
  71. `l MIN+INCR'
  72.      List `INCR+1' lines starting at MIN.  If MIN is omitted, starts
  73.      where last listing left off.  If INCR is omitted, previous value
  74.      of INCR is used.
  75.  
  76. `l MIN-MAX'
  77.      List lines in the indicated range.
  78.  
  79. `l LINE'
  80.      List just the indicated line.
  81.  
  82. `l'
  83.      List next window.
  84.  
  85. `-'
  86.      List previous window.
  87.  
  88. `w LINE'
  89.      List window around LINE
  90.  
  91. `l SUBNAME'
  92.      List subroutine.  If it's a long subroutine it just lists the
  93.      beginning.  Use `l' to list more.
  94.  
  95. `/PATTERN/'
  96.      Regular expression search forward for PATTERN; the final `/' is
  97.      optional.
  98.  
  99. `?PATTERN?'
  100.      Regular expression search backward for PATTERN; the final `?' is
  101.      optional.
  102.  
  103. `L'
  104.      List lines that have breakpoints or actions.
  105.  
  106. `S'
  107.      Lists the names of all subroutines.
  108.  
  109. `t'
  110.      Toggle trace mode on or off.
  111.  
  112. `b LINE CONDITION'
  113.      Set a breakpoint.  If LINE is omitted, sets a breakpoint on the
  114.      line that is about to be executed.  If a CONDITION is specified,
  115.      it is evaluated each time the statement is reached and a
  116.      breakpoint is taken only if the condition is true.  Breakpoints
  117.      may only be set on lines that begin an executable statement.
  118.  
  119. `b SUBNAME CONDITION'
  120.      Set breakpoint at first executable line of subroutine.
  121.  
  122. `d LINE'
  123.      Delete breakpoint.  If LINE is omitted, deletes the breakpoint on
  124.      the line that is about to be executed.
  125.  
  126. `D'
  127.      Delete all breakpoints.
  128.  
  129. `a LINE COMMAND'
  130.      Set an action for LINE.  A multi-line COMMAND may be entered by
  131.      backslashing the newlines.
  132.  
  133. `A'
  134.      Delete all line actions.
  135.  
  136. `< COMMAND'
  137.      Set an action to happen before every debugger prompt.  A
  138.      multi-line command may be entered by backslashing the newlines.
  139.  
  140. `> COMMAND'
  141.      Set an action to happen after the prompt when you've just given a
  142.      command to return to executing the script.  A multi-line command
  143.      may be entered by backslashing the newlines.
  144.  
  145. `V PACKAGE'
  146.      List all variables in PACKAGE.  Default is `main' package.
  147.  
  148. `! NUMBER'
  149.      Redo a debugging command.  If NUMBER is omitted, redoes the
  150.      previous command.
  151.  
  152. `! -NUMBER'
  153.      Redo the command that was that many (NUMBER) commands ago.
  154.  
  155. `H -NUMBER'
  156.      Display last NUMBER commands.  Only commands longer than one
  157.      character are listed.  If NUMBER is omitted, lists them all.
  158.  
  159. `q'
  160. D'
  161.      Quit.
  162.  
  163. `COMMAND'
  164.      Execute COMMAND as a perl statement.  A missing semicolon will be
  165.      supplied.
  166.  
  167. `p EXPR'
  168.      Same as `print DB'OUT expr'.  The `DB'OUT' filehandle is opened to
  169.      `/dev/tty', regardless of where `STDOUT' may be redirected to.
  170.  
  171.    If you want to modify the debugger, copy `perldb.pl' from the perl
  172. library to your current directory and modify it as necessary.  (You'll
  173. also have to put `-I.' on your command line.)  You can do some
  174. customization by setting up a `.perldb' file which contains
  175. initialization code.  For instance, you could make aliases like these:
  176.  
  177.      $DB'alias{'len'} = 's/^len(.*)/p length($1)/';
  178.      $DB'alias{'stop'} = 's/^stop (at|in)/b/';
  179.      $DB'alias{'.'} =
  180.        's/^\./p "\$DB\'sub(\$DB\'line):\t",\$DB\'line[\$DB\'line]/';
  181.  
  182. 
  183. File: perl.info,  Node: Setuid Scripts,  Next: Environment,  Prev: Debugging,  Up: Top
  184.  
  185. Setuid Scripts
  186. **************
  187.  
  188.    *Perl* is designed to make it easy to write secure setuid and setgid
  189. scripts.  Unlike shells, which are based on multiple substitution
  190. passes on each line of the script, *perl* uses a more conventional
  191. evaluation scheme with fewer hidden "gotchas".  Additionally, since the
  192. language has more built-in functionality, it has to rely less upon
  193. external (and possibly untrustworthy) programs to accomplish its
  194. purposes.
  195.  
  196.    In an unpatched 4.2 or 4.3bsd kernel, setuid scripts are
  197. intrinsically insecure, but this kernel feature can be disabled.  If it
  198. is, *perl* can emulate the setuid and setgid mechanism when it notices
  199. the otherwise useless setuid/gid bits on perl scripts.  If the kernel
  200. feature isn't disabled, *perl* will complain loudly that your setuid
  201. script is insecure.  You'll need to either disable the kernel setuid
  202. script feature, or put a C wrapper around the script.
  203.  
  204.    When perl is executing a setuid script, it takes special precautions
  205. to prevent you from falling into any obvious traps.  (In some ways, a
  206. perl script is more secure than the corresponding C program.)  Any
  207. *command line argument*, *environment variable*, or *input* is marked
  208. as "tainted", and may not be used, directly or indirectly, in any
  209. command that invokes a subshell, or in any command that modifies files,
  210. directories or processes.  Any variable that is set within an
  211. expression that has previously referenced a tainted value also becomes
  212. tainted (even if it is logically impossible for the tainted value to
  213. influence the variable).  For example:
  214.  
  215.      $foo = shift;                   # $foo is tainted
  216.      $bar = $foo,'bar';              # $bar is also tainted
  217.      $xxx = <>;                      # Tainted
  218.      $path = $ENV{'PATH'};           # Tainted, but see below
  219.      $abc = 'abc';                   # Not tainted
  220.      
  221.      system "echo $foo";             # Insecure
  222.      system "/bin/echo", $foo;       # Secure (doesn't use sh)
  223.      system "echo $bar";             # Insecure
  224.      system "echo $abc";             # Insecure until PATH set
  225.      
  226.      $ENV{'PATH'} = '/bin:/usr/bin';
  227.      $ENV{'IFS'} = '' if $ENV{'IFS'} ne '';
  228.      
  229.      $path = $ENV{'PATH'};           # Not tainted
  230.      system "echo $abc";             # Is secure now!
  231.      
  232.      open(FOO,"$foo");               # OK
  233.      open(FOO,">$foo");              # Not OK
  234.      
  235.      open(FOO,"echo $foo|");                 # Not OK, but...
  236.      open(FOO,"-|") || exec 'echo', $foo;    # OK
  237.      
  238.      $zzz = `echo $foo`;             # Insecure, zzz tainted
  239.      
  240.      unlink $abc,$foo;               # Insecure
  241.      umask $foo;                     # Insecure
  242.      
  243.      exec "echo $foo";               # Insecure
  244.      exec "echo", $foo;              # Secure (doesn't use sh)
  245.      exec "sh", '-c', $foo;          # Considered secure, alas
  246.  
  247.    The taintedness is associated with each scalar value, so some
  248. elements of an array can be tainted, and others not.
  249.  
  250.    If you try to do something insecure, you will get a fatal error
  251. saying something like "Insecure dependency" or "Insecure PATH".  Note
  252. that you can still write an insecure system call or `exec', but only by
  253. explicitly doing something like the last example above.  You can also
  254. bypass the tainting mechanism by referencing subpatterns--*perl*
  255. presumes that if you reference a substring using `$1', `$2', etc, you
  256. knew what you were doing when you wrote the pattern:
  257.  
  258.      $ARGV[0] =~ /^-P(\w+)$/;
  259.      $printer = $1;          # Not tainted
  260.  
  261.    This is fairly secure since `\w+' doesn't match shell metacharacters.
  262. Use of `.+' would have been insecure, but *perl* doesn't check for
  263. that, so you must be careful with your patterns.  This is the *ONLY*
  264. mechanism for untainting user supplied filenames if you want to do file
  265. operations on them (unless you make `$>' equal to `$<').
  266.  
  267.    It's also possible to get into trouble with other operations that
  268. don't care whether they use tainted values.  Make judicious use of the
  269. file tests in dealing with any user-supplied filenames.  When possible,
  270. do opens and such after setting `$> = $<'.  *Perl* doesn't prevent you
  271. from opening tainted filenames for reading, so be careful what you
  272. print out.  The tainting mechanism is intended to prevent stupid
  273. mistakes, not to remove the need for thought.
  274.  
  275. 
  276. File: perl.info,  Node: Environment,  Next: a2p,  Prev: Setuid Scripts,  Up: Top
  277.  
  278. Environment
  279. ***********
  280.  
  281. HOME
  282.      Used if `chdir' has no argument.
  283.  
  284. LOGDIR
  285.      Used if `chdir' has no argument and `HOME' is not set.
  286.  
  287. PATH
  288.      Used im executing subprocesses, and in finding the script if `-S'
  289.      is used.
  290.  
  291. PERLLIB
  292.      A colon-separated list of directories in which to look for *Perl*
  293.      library files before looking in the standard library and the
  294.      current directory.
  295.  
  296. PERLDB
  297.      The command used to get the debugger code.  If unset, uses:
  298.           require 'perldb.pl'
  299.  
  300.    Apart from these, *perl* uses no other environment variables, except
  301. to make them available to the script being executed, and to child
  302. processes.  However, scripts running setuid would do well to execute
  303. the following lines before doing anything else, just to keep people
  304. honest:
  305.  
  306.      $ENV{'PATH'} = '/bin:/usr/bin';    # or whatever you need
  307.      $ENV{'SHELL'} = '/bin/sh' if $ENV{'SHELL'} ne '';
  308.      $ENV{'IFS'} = '' if $ENV{'IFS'} ne '';
  309.  
  310. Files
  311. =====
  312.  
  313.    The only file that *perl* creates, other than user specified files,
  314. is:
  315.  
  316.      /tmp/perl-eXXXXXX       temporary file for `-e' commands.
  317.  
  318. 
  319. File: perl.info,  Node: a2p,  Next: s2p,  Prev: Environment,  Up: Top
  320.  
  321. a2p - Awk to Perl Translator
  322. ****************************
  323.  
  324.    *A2p* takes an `awk' script specified on the command line (or from
  325. standard input) and produces a comparable *perl* script on the standard
  326. output.
  327.  
  328. * Menu:
  329.  
  330. * a2p Options::         Options to a2p.
  331. * a2p Considerations::  Considerations when using a2p.
  332. * a2p Bugs::            Problems with a2p.
  333.  
  334. 
  335. File: perl.info,  Node: a2p Options,  Next: a2p Considerations,  Up: a2p
  336.  
  337. Options for a2p
  338. ===============
  339.  
  340. Options include:
  341.  
  342. `-D<number>'
  343.      sets debugging flags.
  344.  
  345. `-F<character>'
  346.      tells *a2p* that this `awk' script is always invoked with this
  347.      `-F' switch.
  348.  
  349. `-n<fieldlist>'
  350.      specifies the names of the input fields if input does not have to
  351.      be split into an array.  If you were translating an `awk' script
  352.      that processes the password file, you might say:
  353.  
  354.           a2p -7 -nlogin.password.uid.gid.gcos.shell.home
  355.  
  356.      Any delimiter can be used to separate the field names.
  357.  
  358. `-<number>'
  359.      causes *a2p* to assume that input will always have that many
  360.      fields.
  361.  
  362. 
  363. File: perl.info,  Node: a2p Considerations,  Next: a2p Bugs,  Prev: a2p Options,  Up: a2p
  364.  
  365. Considerations for Using a2p
  366. ============================
  367.  
  368.    *A2p* cannot do as good a job translating as a human would, but it
  369. usually does pretty well.  There are some areas where you may want to
  370. examine the perl script produced and tweak it some.  Here are some of
  371. them, in no particular order.
  372.  
  373.    There is an `awk' idiom of putting `int()' around a string
  374. expression to force numeric interpretation, even though the argument is
  375. always integer anyway.  This is generally unneeded in *perl*, but *a2p*
  376. can't tell if the argument is always going to be integer, so it leaves
  377. it in.  You may wish to remove it.
  378.  
  379.    Perl differentiates numeric comparison from string comparison.
  380. `Awk' has one operator for both that decides at run time which
  381. comparison to do.  *A2p* does not try to do a complete job of `awk'
  382. emulation at this point.  Instead it guesses which one you want.  It's
  383. almost always right, but it can be spoofed.  All such guesses are
  384. marked with the comment `#???'.  You should go through and check them.
  385. You might want to run at least once with the `-w' switch to *perl*,
  386. which will warn you if you use `==' where you should have used *eq*.
  387.  
  388.    Perl does not attempt to emulate the behavior of `awk' in which
  389. nonexistent array elements spring into existence simply by being
  390. referenced.  If somehow you are relying on this mechanism to create null
  391. entries for a subsequent for...in, they won't be there in perl.
  392.  
  393.    If *a2p* makes a split line that assigns to a list of variables that
  394. looks like `(Fld1, Fld2, Fld3...)' you may want to rerun *a2p* using
  395. the `-n' option mentioned above.  This will let you name the fields
  396. throughout the script.  If it splits to an array instead, the script is
  397. probably referring to the number of fields somewhere.
  398.  
  399.    The `exit' statement in `awk' doesn't necessarily exit; it goes to
  400. the END block if there is one.  `Awk' scripts that do contortions
  401. within the END block to bypass the block under such circumstances can
  402. be simplified by removing the conditional in the END block and just
  403. exiting directly from the perl script.
  404.  
  405.    Perl has two kinds of arrays, numerically-indexed and associative.
  406. `Awk' arrays are usually translated to associative arrays, but if you
  407. happen to know that the index is always going to be numeric you could
  408. change the `{...}' to `[...]'.  Iteration over an associative array is
  409. done using the `keys()' function, but iteration over a numeric array is
  410. NOT.  You might need to modify any loop that is iterating over the
  411. array in question.
  412.  
  413.    `Awk' starts by assuming OFMT has the value `%.6g'.  Perl starts by
  414. assuming its equivalent, `$#', to have the value `%.20g'.  You'll want
  415. to set `$#' explicitly if you use the default value of OFMT.
  416.  
  417.    Near the top of the line loop will be the split operation that is
  418. implicit in the `awk' script.  There are times when you can move this
  419. down past some conditionals that test the entire record so that the
  420. split is not done as often.
  421.  
  422.    For aesthetic reasons you may wish to change the array base `$['
  423. from 1 back to perl's default of 0, but remember to change all array
  424. subscripts AND all `substr()' and `index()' operations to match.
  425.  
  426.    Cute comments that say "# Here is a workaround because awk is dumb"
  427. are passed through unmodified.
  428.  
  429.    `Awk' scripts are often embedded in a shell script that pipes stuff
  430. into and out of `awk'.  Often the shell script wrapper can be
  431. incorporated into the perl script, since perl can start up pipes into
  432. and out of itself, and can do other things that `awk' can't do by
  433. itself.
  434.  
  435.    Scripts that refer to the special variables RSTART and RLENGTH can
  436. often be simplified by referring to the variables `$`', `$&' and `$'',
  437. as long as they are within the scope of the pattern match that sets
  438. them.
  439.  
  440.    The produced perl script may have subroutines defined to deal with
  441. awk's semantics regarding `getline' and `print'.  Since *a2p* usually
  442. picks correctness over efficiency.  it is almost always possible to
  443. rewrite such code to be more efficient by discarding the semantic sugar.
  444.  
  445.    For efficiency, you may wish to remove the keyword from any return
  446. statement that is the last statement executed in a subroutine.  *A2p*
  447. catches the most common case, but doesn't analyze embedded blocks for
  448. subtler cases.
  449.  
  450.    `ARGV[0]' translates to `$ARGV0', but `ARGV[n]' translates to
  451. `$ARGV[$n]'.  A loop that tries to iterate over `ARGV[0]' won't find it.
  452.  
  453.    *A2p* uses no environment variables.
  454.  
  455. 
  456. File: perl.info,  Node: a2p Bugs,  Prev: a2p Considerations,  Up: a2p
  457.  
  458. Bugs in a2p
  459. ===========
  460.  
  461.    It would be possible to emulate awk's behavior in selecting string
  462. versus numeric operations at run time by inspection of the operands, but
  463. it would be gross and inefficient.  Besides, *a2p* almost always
  464. guesses right.
  465.  
  466.    Storage for the `awk' syntax tree is currently static, and can run
  467. out.
  468.  
  469. 
  470. File: perl.info,  Node: s2p,  Next: h2ph,  Prev: a2p,  Up: Top
  471.  
  472. s2p - Sed to Perl Translator
  473. ****************************
  474.  
  475.    *S2p* takes a `sed' script specified on the command line (or from
  476. standard input) and produces a comparable *perl* script on the standard
  477. output.
  478.  
  479. * Menu:
  480.  
  481. * s2p Options::         Options to s2p
  482. * s2p Considerations::  Considerations when using s2p.
  483.  
  484. 
  485. File: perl.info,  Node: s2p Options,  Next: s2p Considerations,  Up: s2p
  486.  
  487. Options for s2p
  488. ===============
  489.  
  490. Options include:
  491.  
  492. `-D<number>'
  493.      sets debugging flags.
  494.  
  495. `-n'
  496.      specifies that this `sed' script was always invoked with a `sed
  497.      -n'.  Otherwise a switch parser is prepended to the front of the
  498.      script.
  499.  
  500. `-p'
  501.      specifies that this `sed' script was never invoked with a `sed -n'.
  502.      Otherwise a switch parser is prepended to the front of the script.
  503.  
  504. 
  505. File: perl.info,  Node: s2p Considerations,  Prev: s2p Options,  Up: s2p
  506.  
  507. Considerations
  508. ==============
  509.  
  510.    The perl script produced looks very `sed'-ish, and there may very
  511. well be better ways to express what you want to do in perl.  For
  512. instance, *s2p* does not make any use of the `split' operator, but you
  513. might want to.
  514.  
  515.    The perl script you end up with may be either faster or slower than
  516. the original `sed' script.  If you're only interested in speed you'll
  517. just have to try it both ways.  Of course, if you want to do something
  518. `sed' doesn't do, you have no choice.
  519.  
  520.    *S2p* uses no environment variables.
  521.  
  522. 
  523. File: perl.info,  Node: h2ph,  Next: Diagnostics,  Prev: s2p,  Up: Top
  524.  
  525. h2ph - Converting C header files into Perl
  526. ******************************************
  527.  
  528.    *h2ph* converts any C header files specified to the corresponding
  529. Perl header file format.  It is most easily run while in `/usr/include':
  530.  
  531.      cd /usr/include; h2ph * sys/*
  532.  
  533.    C header files are located in the `/usr/include' directory and end
  534. with the extension `.h'.  Perl header files are typically located in
  535. `/usr/local/lib/perl', with the extension `.ph' to distinguish the
  536. files from a C header file.
  537.  
  538. Tidbits and Messages in h2ph
  539. ============================
  540.  
  541.    No environment variables are used.  The only warnings you will
  542. probably see from *h2ph* are the usual warnings if it can't read or
  543. write the files involved.
  544.  
  545. Bugs in h2ph
  546. ============
  547.  
  548.    * *h2ph* doesn't construct the `%sizeof' array for you.
  549.  
  550.    * It doesn't handle all C constructs, but it does attempt to isolate
  551.      definitions inside `eval's so that you can get at the definitions
  552.      that it can translate.
  553.  
  554.    * *h2ph* is only intended as a rough tool.  You may need to dicker
  555.      with the files produced.
  556.  
  557. 
  558. File: perl.info,  Node: Diagnostics,  Next: Traps,  Prev: h2ph,  Up: Top
  559.  
  560. Diagnostics
  561. ***********
  562.  
  563.    Compilation errors will tell you the line number of the error, with
  564. an indication of the next token or token type that was to be examined.
  565. (In the case of a script passed to *perl* via `-e' switches, each `-e'
  566. is counted as one line.)
  567.  
  568.    Setuid scripts have additional constraints that can produce error
  569. messages such as "Insecure dependency".  *Note Setuid Scripts::.
  570.  
  571. 
  572. File: perl.info,  Node: Traps,  Next: Bugs,  Prev: Diagnostics,  Up: Top
  573.  
  574. Traps
  575. *****
  576.  
  577.    This chapter points out traps and pitfalls you may run into if you
  578. are used to `awk', `C', `sed' or `shell' programming.
  579.  
  580. * Menu:
  581.  
  582. * Awk Traps::           Notes for awk users.
  583. * C Traps::             Notes for C programmers.
  584. * Sed Traps::           Notes for sed programmers.
  585. * Shell Traps::         Notes for shell programmers.
  586.  
  587. 
  588. File: perl.info,  Node: Awk Traps,  Next: C Traps,  Up: Traps
  589.  
  590. Awk Traps
  591. =========
  592.  
  593. Accustomed `awk' users should take special note of the following:
  594.  
  595.    * Semicolons are required after all simple statements in *perl*
  596.      (except at the end of a block).  Newline is not a statement
  597.      delimiter.
  598.  
  599.    * Curly brackets are required on `if's and `while's.
  600.  
  601.    * Variables begin with `$' or `@' in *perl*.
  602.  
  603.    * Arrays index from 0 unless you set `$['.  Likewise string
  604.      positions in `substr()' and `index()'.
  605.  
  606.    * You have to decide whether your array has numeric or string
  607.      indices.
  608.  
  609.    * Associative array values do not spring into existence upon mere
  610.      reference.
  611.  
  612.    * You have to decide whether you want to use string or numeric
  613.      comparisons.
  614.  
  615.    * Reading an input line does not split it for you.  You get to split
  616.      it yourself to an array.  And the `split' operator has different
  617.      arguments.
  618.  
  619.    * The current input line is normally in `$_', not `$0'.  It
  620.      generally does not have the newline stripped.  (`$0' is the name of
  621.      the program executed.)
  622.  
  623.    * `$<digit>' does not refer to fields--it refers to substrings
  624.      matched by the last match pattern.
  625.  
  626.    * The `print' statement does not add field and record separators
  627.      unless you set `$,' and `$\'.
  628.  
  629.    * You must open your files before you print to them.
  630.  
  631.    * The range operator is `..', not comma.  (The comma operator works
  632.      as in C.)
  633.  
  634.    * The match operator is `=~', not `~'.  (`~' is the one's complement
  635.      operator, as in C.)
  636.  
  637.    * The exponentiation operator is `**', not `^'.  (`^' is the XOR
  638.      operator, as in C.)
  639.  
  640.    * The concatenation operator is `.', not the null string.  (Using the
  641.      null string would render `/pat/ /pat/' unparsable, since the third
  642.      slash would be interpreted as a division operator--the tokener is
  643.      in fact slightly context sensitive for operators like `/', `?', and
  644.      `<'.  And in fact, `.' itself can be the beginning of a number.)
  645.  
  646.    * `next', `exit' and `continue' work differently.
  647.  
  648.    * The following variables work differently
  649.  
  650.           *Awk*                 *Perl*
  651.           ARGC                  $#ARGV
  652.           ARGV[0]               $0
  653.           FILENAME              $ARGV
  654.           FNR                   $. - something
  655.           FS                    (whatever you like)
  656.           NF                    $#Fld, or some such
  657.           NR                    $.
  658.           OFMT                  $#
  659.           OFS                   $,
  660.           ORS                   $\
  661.           RLENGTH               length($&)
  662.           RS                    $/
  663.           RSTART                length($`)
  664.           SUBSEP                $;
  665.  
  666.    * When in doubt, run the `awk' construct through *a2p* and see what
  667.      it gives you (*note a2p::. for more info).
  668.  
  669. 
  670. File: perl.info,  Node: C Traps,  Next: Sed Traps,  Prev: Awk Traps,  Up: Traps
  671.  
  672. C Traps
  673. =======
  674.  
  675. Cerebral C programmers should take note of the following:
  676.    * Curly brackets are required on `if's and `while's.
  677.  
  678.    * You should use `elsif' rather than `else if'
  679.  
  680.    * `break' and `continue' become `last' and `next', respectively.
  681.  
  682.    * There's no `switch' statement.
  683.  
  684.    * Variables begin with `$', `@' or `%' in *perl*.
  685.  
  686.    * `printf' does not implement `*'.
  687.  
  688.    * Comments begin with `#', not `/*'.
  689.  
  690.    * You can't take the address of anything.
  691.  
  692.    * `ARGV' must be capitalized.
  693.  
  694.    * The "system" calls `link', `unlink', `rename', etc. return nonzero
  695.      for success, not zero (0).
  696.  
  697.    * Signal handlers deal with signal names, not numbers.
  698.  
  699. 
  700. File: perl.info,  Node: Sed Traps,  Next: Shell Traps,  Prev: C Traps,  Up: Traps
  701.  
  702. Sed Traps
  703. =========
  704.  
  705. Seasoned `sed' programmers should take note of the following:
  706.    * Backreferences in substitutions use `$' rather than `\'.
  707.  
  708.    * The pattern matching metacharacters `(', `)', and `|' do not have
  709.      backslashes in front.
  710.  
  711.    * The range operator is `..' rather than comma.
  712.  
  713. 
  714. File: perl.info,  Node: Shell Traps,  Prev: Sed Traps,  Up: Traps
  715.  
  716. Shell Traps
  717. ===========
  718.  
  719. Sharp shell programmers should take note of the following:
  720.    * The backtick operator does variable interpretation without regard
  721.      to the presence of single quotes in the command.
  722.  
  723.    * The backtick operator does no translation of the return value,
  724.      unlike `csh'.
  725.  
  726.    * Shells (especially `csh') do several levels of substitution on each
  727.      command line.  *Perl* does substitution only in certain constructs
  728.      such as double quotes, backticks, angle brackets and search
  729.      patterns.
  730.  
  731.    * Shells interpret scripts a little bit at a time.  *Perl* compiles
  732.      the whole program before executing it.
  733.  
  734.    * The arguments are available via `@ARGV', not `$1', `$2', etc.
  735.  
  736.    * The environment is not automatically made available as variables.
  737.  
  738. 
  739. File: perl.info,  Node: Bugs,  Next: Credits,  Prev: Traps,  Up: Top
  740.  
  741. Bugs
  742. ****
  743.  
  744.    *Perl* is at the mercy of your machine's definitions of various
  745. operations such as type casting, `atof()' and `sprintf()'.
  746.  
  747.    If your stdio requires a `seek' or `eof' between reads and writes on
  748. a particular stream, so does *perl*.  (This doesn't apply to
  749. `sysread()' and `syswrite()'.)
  750.  
  751.    While none of the built-in data types have any arbitrary size limits
  752. (apart from memory size), there are still a few arbitrary limits: a
  753. given identifier may not be longer than 255 characters, and no component
  754. of your `PATH' may be longer than 255 if you use `-S'.  A regular
  755. expression may not compile to more than 32767 bytes internally.
  756.  
  757.    *Perl* actually stands for Pathologically Eclectic Rubbish Lister,
  758. but don't tell anyone I said that.
  759.  
  760. 
  761. File: perl.info,  Node: Credits,  Next: Errata,  Prev: Bugs,  Up: Top
  762.  
  763. The Credits
  764. ***********
  765.  
  766. Perl was designed and implemented by...                  ...Larry Wall
  767. <lwall@netlabs.com>
  768. MS-DOS port of perl by...                  ...Diomidis Spinellis
  769. <dds@cc.ic.ac.uk>
  770. Texinfo version of *perl* manual by...                  ...Jeff Kellem
  771. <composer@Beyond.Dreams.ORG>
  772.  
  773. 
  774. File: perl.info,  Node: Errata,  Next: Command Summary,  Prev: Credits,  Up: Top
  775.  
  776. Errata and Addenda
  777. ******************
  778.  
  779.    The Perl book, Programming Perl, has the following omissions and
  780. goofs.
  781.  
  782.    * On page 5, the examples which read
  783.  
  784.           eval '/usr/bin/perl
  785.  
  786.      should read
  787.  
  788.           eval 'exec /usr/bin/perl
  789.  
  790.    * On page 195, the equivalent to the System V `sum' program only
  791.      works for very small files.  To do larger files, use
  792.  
  793.           undef $/;
  794.           $checksum = unpack("%32C*",<>) % 32767;
  795.  
  796.    * The descriptions of `alarm' and `sleep' refer to signal
  797.      `SIGALARM'.  These should refer to `SIGALRM'.
  798.  
  799.    * The `-0' switch to set the initial value of `$/' was added to Perl
  800.      after the book went to press.
  801.  
  802.    * The `-l' switch now does automatic line ending processing.
  803.  
  804.    * The `qx//' construct is now a synonym for backticks.
  805.  
  806.    * `$0' may now be assigned to set the argument displayed by `ps(1)'.
  807.  
  808.    * The new `@###.##' format was omitted accidentally from the
  809.      description on formats.
  810.  
  811.    * It wasn't known at press time that `s///ee' caused multiple
  812.      evaluations of the replacement expression.  This is to be
  813.      construed as a feature.
  814.  
  815.    * `(LIST) x $count' now does array replication.
  816.  
  817.    * There is now no limit on the number of parentheses in a regular
  818.      expression.
  819.  
  820.    * In double-quote context, more escapes are supported: \e, \a, \x1b,
  821.      \c[, \l, \L, \u, \U, \E.  The latter five control up/lower case
  822.      translation.
  823.  
  824.    * The `$/' variable may now be set to a multi-character delimiter.
  825.  
  826.    * There is now a `g' modifier on ordinary pattern matching that
  827.      causes it to iterate through a string finding multiple matches.
  828.  
  829.    * All of the `$^X' variables are new except for `$^T'.
  830.  
  831.    * The default top-of-form format for FILEHANDLE is now
  832.      `FILEHANDLE_TOP' rather than `top'.
  833.  
  834.    * The `eval {}' and `sort {}' constructs were added in version 4.018.
  835.  
  836.    * The `v' and `V' (little-endian) template options for `pack' and
  837.      `unpack' were added in 4.019.
  838.  
  839. 
  840. File: perl.info,  Node: Command Summary,  Next: Function Index,  Prev: Errata,  Up: Top
  841.  
  842. Command Summary (syntax only)
  843. *****************************
  844.  
  845. THIS SECTION IS CURRENTLY INCOMPLETE and may change without notice!!
  846. (As may the rest of this document... ;-)
  847.  
  848.      /PATTERN/io
  849.      ?PATTERN?
  850.      
  851.      accept(NEWSOCKET,GENERICSOCKET)
  852.      atan2(X,Y)
  853.      
  854.      bind(SOCKET,NAME)
  855.      binmode(FILEHANDLE)
  856.      binmode FILEHANDLE
  857.      
  858.      chdir(EXPR)
  859.      chdir EXPR
  860.      chdir
  861.      chmod(LIST)
  862.      chmod LIST
  863.      chop(LIST)
  864.      chop(VARIABLE)
  865.      chop VARIABLE
  866.      chop
  867.      chown(LIST)
  868.      chown LIST
  869.      chroot(FILENAME)
  870.      chroot FILENAME
  871.      chroot
  872.      close(FILEHANDLE)
  873.      close FILEHANDLE
  874.      closedir(DIRHANDLE)
  875.      closedir DIRHANDLE
  876.      connect(SOCKET,NAME)
  877.      cos(EXPR)
  878.      cos EXPR
  879.      cos
  880.      crypt(PLAINTEXT,SALT)
  881.      
  882.      dbmclose(ASSOC_ARRAY)
  883.      dbmclose ASSOC_ARRAY
  884.      dbmopen(ASSOC,DBNAME,MODE)
  885.      defined(EXPR)
  886.      defined EXPR
  887.      delete $ASSOC{KEY}
  888.      die(LIST)
  889.      die LIST
  890.      die
  891.      do BLOCK
  892.      do EXPR
  893.      do SUBROUTINE (LIST)
  894.      dump LABEL
  895.      dump
  896.      
  897.      each(ASSOC_ARRAY)
  898.      each ASSOC_ARRAY
  899.      endpwent
  900.      endgrent
  901.      endhostent
  902.      endnetent
  903.      endprotoent
  904.      endpwent
  905.      endservent
  906.      eof(FILEHANDLE)
  907.      eof()
  908.      eof
  909.      eval(EXPR)
  910.      eval EXPR
  911.      eval
  912.      exec(LIST)
  913.      exec LIST
  914.      exit(EXPR)
  915.      exit EXPR
  916.      exp(EXPR)
  917.      exp EXPR
  918.      exp
  919.      
  920.      fcntl(FILEHANDLE,FUNCTION,SCALAR)
  921.      fileno(FILEHANDLE)
  922.      fileno FILEHANDLE
  923.      flock(FILEHANDLE,OPERATION)
  924.      fork
  925.      
  926.      getc(FILEHANDLE)
  927.      getc FILEHANDLE
  928.      getc
  929.      getgrent
  930.      getgrgid(GID)
  931.      getgrnam(NAME)
  932.      gethostbyaddr(ADDR,ADDRTYPE)
  933.      gethostbyname(NAME)
  934.      gethostent
  935.      getlogin
  936.      getnetbyaddr(ADDR,ADDRTYPE)
  937.      getnetbyname(NAME)
  938.      getnetent
  939.      getpeername(SOCKET)
  940.      getpgrp(PID)
  941.      getpgrp PID
  942.      getpgrp
  943.      getppid
  944.      getpriority(WHICH,WHO)
  945.      getprotobyname(NAME)
  946.      getprotobynumber(NUMBER)
  947.      getprotoent
  948.      getpwent
  949.      getpwnam(NAME)
  950.      getpwuid(UID)
  951.      getservbyname(NAME,PROTO)
  952.      getservbyport(PORT,PROTO)
  953.      getservent
  954.      getsockname(SOCKET)
  955.      getsockopt(SOCKET,LEVEL,OPTNAME)
  956.      gmtime(EXPR)
  957.      gmtime EXPR
  958.      gmtime
  959.      goto LABEL
  960.      grep(EXPR,LIST)
  961.      
  962.      hex(EXPR)
  963.      hex EXPR
  964.      hex
  965.      
  966.      index(STR,SUBSTR)
  967.      int(EXPR)
  968.      int EXPR
  969.      int
  970.      ioctl(FILEHANDLE,FUNCTION,SCALAR)
  971.      
  972.      join(EXPR,LIST)
  973.      join(EXPR,ARRAY)
  974.      
  975.      keys(ASSOC_ARRAY)
  976.      keys ASSOC_ARRAY
  977.      kill(LIST)
  978.      kill LIST
  979.      
  980.      last LABEL
  981.      last
  982.      length(EXPR)
  983.      length EXPR
  984.      length
  985.      link(OLDFILE,NEWFILE)
  986.      listen(SOCKET,QUEUESIZE)
  987.      local(LIST)
  988.      localtime(EXPR)
  989.      localtime EXPR
  990.      localtime
  991.      log(EXPR)
  992.      log EXPR
  993.      log
  994.      lstat(FILEHANDLE)
  995.      lstat FILEHANDLE
  996.      lstat(EXPR)
  997.      lstat SCALARVARIABLE
  998.      
  999.      m/PATTERN/io
  1000.      /PATTERN/io
  1001.      mkdir(FILENAME,MODE)
  1002.      
  1003.      next LABEL
  1004.      next
  1005.      
  1006.      oct(EXPR)
  1007.      oct EXPR
  1008.      oct
  1009.      open(FILEHANDLE,EXPR)
  1010.      open(FILEHANDLE)
  1011.      open FILEHANDLE
  1012.      opendir(DIRHANDLE,EXPR)
  1013.      ord(EXPR)
  1014.      ord EXPR
  1015.      ord
  1016.      
  1017.      pack(TEMPLATE,LIST)
  1018.      pipe(READHANDLE,WRITEHANDLE)
  1019.      pop(ARRAY)
  1020.      pop ARRAY
  1021.      print(FILEHANDLE LIST)
  1022.      print(LIST)
  1023.      print FILEHANDLE LIST
  1024.      print LIST
  1025.      print
  1026.      printf(FILEHANDLE LIST)
  1027.      printf(LIST)
  1028.      printf FILEHANDLE LIST
  1029.      printf LIST
  1030.      printf
  1031.      push(ARRAY,LIST)
  1032.      
  1033.      q/STRING/
  1034.      qq/STRING/
  1035.      
  1036.      rand(EXPR)
  1037.      rand EXPR
  1038.      rand
  1039.      read(FILEHANDLE,SCALAR,LENGTH)
  1040.      readdir(DIRHANDLE)
  1041.      readdir DIRHANDLE
  1042.      readlink(EXPR)
  1043.      readlink EXPR
  1044.      readlink
  1045.      recv(SOCKET,SCALAR,LEN,FLAGS)
  1046.      redo LABEL
  1047.      redo
  1048.      rename(OLDNAME,NEWNAME)
  1049.      require(EXPR)
  1050.      require EXPR
  1051.      require
  1052.      reset(EXPR)
  1053.      reset EXPR
  1054.      reset
  1055.      return LIST
  1056.      reverse(LIST)
  1057.      reverse LIST
  1058.      rewinddir(DIRHANDLE)
  1059.      rewinddir DIRHANDLE
  1060.      rindex(STR,SUBSTR)
  1061.      rmdir(FILENAME)
  1062.      rmdir FILENAME
  1063.      rmdir
  1064.      
  1065.      s/PATTERN/REPLACEMENT/gieo
  1066.      seek(FILEHANDLE,POSITION,WHENCE)
  1067.      seekdir(DIRHANDLE,POS)
  1068.      select(FILEHANDLE)
  1069.      select
  1070.      select(RBITS,WBITS,EBITS,TIMEOUT)
  1071.      send(SOCKET,MSG,FLAGS,TO)
  1072.      send(SOCKET,MSG,FLAGS)
  1073.      setgrent
  1074.      sethostent(STAYOPEN)
  1075.      setnetent(STAYOPEN)
  1076.      setpgrp(PID,PGRP)
  1077.      setpriority(WHICH,WHO,PRIORITY)
  1078.      setprotoent(STAYOPEN)
  1079.      setpwent
  1080.      setservent(STAYOPEN)
  1081.      setsockopt(SOCKET,LEVEL,OPTNAME,OPTVAL)
  1082.      shift(ARRAY)
  1083.      shift ARRAY
  1084.      shift
  1085.      shutdown(SOCKET,HOW)
  1086.      sin(EXPR)
  1087.      sin EXPR
  1088.      sin
  1089.      sleep(EXPR)
  1090.      sleep EXPR
  1091.      sleep
  1092.      socket(SOCKET,DOMAIN,TYPE,PROTOCOL)
  1093.      socketpair(SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL)
  1094.      sort(SUBROUTINE LIST)
  1095.      sort(LIST)
  1096.      sort SUBROUTINE LIST
  1097.      sort LIST
  1098.      splice(ARRAY,OFFSET,LENGTH,LIST)
  1099.      splice(ARRAY,OFFSET,LENGTH)
  1100.      splice(ARRAY,OFFSET)
  1101.      split(/PATTERN/,EXPR,LIMIT)
  1102.      split(/PATTERN/,EXPR)
  1103.      split(/PATTERN/)
  1104.      split
  1105.      sprintf(FORMAT,LIST)
  1106.      sqrt(EXPR)
  1107.      sqrt EXPR
  1108.      sqrt
  1109.      srand(EXPR)
  1110.      srand EXPR
  1111.      srand
  1112.      stat(FILEHANDLE)
  1113.      stat FILEHANDLE
  1114.      stat(EXPR)
  1115.      stat SCALARVARIABLE
  1116.      study(SCALAR)
  1117.      study SCALAR
  1118.      study
  1119.      substr(EXPR,OFFSET,LEN)
  1120.      symlink(OLDFILE,NEWFILE)
  1121.      syscall(LIST)
  1122.      syscall LIST
  1123.      system(LIST)
  1124.      system LIST
  1125.      
  1126.      tell(FILEHANDLE)
  1127.      tell FILEHANDLE
  1128.      tell
  1129.      telldir(DIRHANDLE)
  1130.      telldir DIRHANDLE
  1131.      time
  1132.      times
  1133.      tr/SEARCHLIST/REPLACEMENTLIST/
  1134.      
  1135.      umask(EXPR)
  1136.      umask EXPR
  1137.      umask
  1138.      undef(EXPR)
  1139.      undef EXPR
  1140.      undef
  1141.      unlink(LIST)
  1142.      unlink LIST
  1143.      unlink
  1144.      unpack(TEMPLATE,EXPR)
  1145.      unshift(ARRAY,LIST)
  1146.      utime(LIST)
  1147.      utime LIST
  1148.      
  1149.      values(ASSOC_ARRAY)
  1150.      values ASSOC_ARRAY
  1151.      vec(EXPR,OFFSET,BITS)
  1152.      
  1153.      wait
  1154.      wantarray
  1155.      warn(LIST)
  1156.      warn LIST
  1157.      write(FILEHANDLE)
  1158.      write(EXPR)
  1159.      write
  1160.      
  1161.      y/SEARCHLIST/REPLACEMENTLIST/
  1162.  
  1163. 
  1164. File: perl.info,  Node: Function Index,  Next: Concept Index,  Prev: Command Summary,  Up: Top
  1165.  
  1166. Function Index
  1167. **************
  1168.  
  1169. * Menu:
  1170.  
  1171. * /PATTERN/:                            Search and Replace Functions.
  1172. * ?PATTERN?:                            Search and Replace Functions.
  1173. * accept:                               Networking Functions.
  1174. * alarm:                                System Interaction.
  1175. * atan2:                                Math Functions.
  1176. * bind:                                 Networking Functions.
  1177. * binmode:                              Input/Output.
  1178. * caller:                               Subroutine Functions.
  1179. * chdir:                                Directory Reading Functions.
  1180. * chgrp (part of chown):                File Operations.
  1181. * chmod:                                File Operations.
  1182. * chop:                                 String Functions.
  1183. * chown:                                File Operations.
  1184. * chroot:                               System Interaction.
  1185. * close:                                Input/Output.
  1186. * closedir:                             Directory Reading Functions.
  1187. * connect:                              Networking Functions.
  1188. * continue:                             Compound Statements.
  1189. * cos:                                  Math Functions.
  1190. * crypt:                                String Functions.
  1191. * dbmclose:                             DBM Functions.
  1192. * dbmopen:                              DBM Functions.
  1193. * defined:                              Variable Functions.
  1194. * delete:                               Array and List Functions.
  1195. * die:                                  System Interaction.
  1196. * do BLOCK:                             Flow Control Functions.
  1197. * do EXPR:                              Perl Library Functions.
  1198. * do SUBROUTINE:                        Subroutine Functions.
  1199. * dump:                                 Miscellaneous Functions.
  1200. * each:                                 Array and List Functions.
  1201. * else:                                 Compound Statements.
  1202. * elsif:                                Compound Statements.
  1203. * endgrent:                             System Interaction.
  1204. * endhostent:                           System Interaction.
  1205. * endnetent:                            System Interaction.
  1206. * endprotoent:                          System Interaction.
  1207. * endpwent:                             System Interaction.
  1208. * endservent:                           System Interaction.
  1209. * eof:                                  Input/Output.
  1210. * eval:                                 Miscellaneous Functions.
  1211. * exec:                                 System Interaction.
  1212. * exit:                                 System Interaction.
  1213. * exp:                                  Math Functions.
  1214. * fcntl:                                File Operations.
  1215. * fileno:                               File Operations.
  1216. * flock:                                File Operations.
  1217. * for:                                  Compound Statements.
  1218. * foreach:                              Compound Statements.
  1219. * fork:                                 System Interaction.
  1220. * getc:                                 Input/Output.
  1221. * getgrent:                             System Interaction.
  1222. * getgrgid:                             System Interaction.
  1223. * getgrnam:                             System Interaction.
  1224. * gethostbyaddr:                        System Interaction.
  1225. * gethostbyname:                        System Interaction.
  1226. * gethostent:                           System Interaction.
  1227. * getlogin:                             System Interaction.
  1228. * getnetbyaddr:                         System Interaction.
  1229. * getnetbyname:                         System Interaction.
  1230. * getnetent:                            System Interaction.
  1231. * getpeername:                          Networking Functions.
  1232. * getpgrp:                              System Interaction.
  1233. * getppid:                              System Interaction.
  1234. * getpriority:                          System Interaction.
  1235. * getprotobyname:                       System Interaction.
  1236. * getprotobynumber:                     System Interaction.
  1237. * getprotoent:                          System Interaction.
  1238. * getpwent:                             System Interaction.
  1239. * getpwnam:                             System Interaction.
  1240. * getpwuid:                             System Interaction.
  1241. * getservbyname:                        System Interaction.
  1242. * getservbyport:                        System Interaction.
  1243. * getservent:                           System Interaction.
  1244. * getsockname:                          Networking Functions.
  1245. * getsockopt:                           Networking Functions.
  1246. * gmtime:                               Time Functions.
  1247. * goto:                                 Flow Control Functions.
  1248. * grep:                                 Array and List Functions.
  1249. * hex:                                  Math Functions.
  1250. * if:                                   Simple Statements.
  1251. * if:                                   Compound Statements.
  1252. * index:                                String Functions.
  1253. * int:                                  Math Functions.
  1254. * ioctl:                                System Interaction.
  1255. * join:                                 Array and List Functions.
  1256. * keys:                                 Array and List Functions.
  1257. * kill:                                 System Interaction.
  1258. * last:                                 Flow Control Functions.
  1259. * length:                               String Functions.
  1260. * link:                                 File Operations.
  1261. * listen:                               Networking Functions.
  1262. * local:                                Subroutine Functions.
  1263. * localtime:                            Time Functions.
  1264. * log:                                  Math Functions.
  1265. * lstat:                                File Operations.
  1266. * m/PATTERN/:                           Search and Replace Functions.
  1267. * mkdir:                                Directory Reading Functions.
  1268. * msgctl:                               System V IPC.
  1269. * msgget:                               System V IPC.
  1270. * msgrcv:                               System V IPC.
  1271. * msgsnd:                               System V IPC.
  1272. * next:                                 Flow Control Functions.
  1273. * oct:                                  Math Functions.
  1274. * open:                                 Input/Output.
  1275. * opendir:                              Directory Reading Functions.
  1276. * ord:                                  Miscellaneous Functions.
  1277. * pack:                                 Structure Conversion.
  1278. * pipe:                                 Input/Output.
  1279. * pop:                                  Array and List Functions.
  1280. * print:                                Input/Output.
  1281. * printf:                               Input/Output.
  1282. * push:                                 Array and List Functions.
  1283. * q (single quote operator):            Miscellaneous Functions.
  1284. * qq (double quote operator):           Miscellaneous Functions.
  1285. * qx (backquote operator):              Miscellaneous Functions.
  1286. * rand:                                 Miscellaneous Functions.
  1287. * read:                                 Input/Output.
  1288. * readdir:                              Directory Reading Functions.
  1289. * readlink:                             File Operations.
  1290. * recv:                                 Networking Functions.
  1291. * redo:                                 Flow Control Functions.
  1292. * rename:                               File Operations.
  1293. * require:                              Perl Library Functions.
  1294. * reset:                                Variable Functions.
  1295. * return:                               Subroutine Functions.
  1296. * reverse:                              Array and List Functions.
  1297. * rewinddir:                            Directory Reading Functions.
  1298. * rindex:                               String Functions.
  1299. * rmdir:                                Directory Reading Functions.
  1300. * s/PATTERN/REPLACEMENT/:               Search and Replace Functions.
  1301. * scalar:                               Variable Functions.
  1302. * seek:                                 Input/Output.
  1303. * seekdir:                              Directory Reading Functions.
  1304. * select(FILEHANDLE):                   Input/Output.
  1305. * select(RBITS,WBITS,EBITS,TIMEOUT):    Input/Output.
  1306. * semctl:                               System V IPC.
  1307. * semget:                               System V IPC.
  1308. * semop:                                System V IPC.
  1309. * send:                                 Networking Functions.
  1310. * setgrent:                             System Interaction.
  1311. * sethostent:                           System Interaction.
  1312. * setnetent:                            System Interaction.
  1313. * setpgrp:                              System Interaction.
  1314. * setpriority:                          System Interaction.
  1315. * setprotoent:                          System Interaction.
  1316. * setpwent:                             System Interaction.
  1317. * setservent:                           System Interaction.
  1318. * setsockopt:                           Networking Functions.
  1319. * shift:                                Array and List Functions.
  1320. * shmctl:                               System V IPC.
  1321. * shmget:                               System V IPC.
  1322. * shmread:                              System V IPC.
  1323. * shmwrite:                             System V IPC.
  1324. * shutdown:                             Networking Functions.
  1325. * sin:                                  Math Functions.
  1326. * sleep:                                System Interaction.
  1327. * socket:                               Networking Functions.
  1328. * socketpair:                           Networking Functions.
  1329. * sort:                                 Array and List Functions.
  1330. * splice:                               Array and List Functions.
  1331. * split:                                Array and List Functions.
  1332. * sprintf:                              Miscellaneous Functions.
  1333. * sqrt:                                 Math Functions.
  1334. * srand:                                Miscellaneous Functions.
  1335. * stat:                                 File Operations.
  1336. * study:                                Search and Replace Functions.
  1337. * substitute function:                  Search and Replace Functions.
  1338. * substr:                               String Functions.
  1339. * symlink:                              File Operations.
  1340. * syscall:                              System Interaction.
  1341. * sysread:                              System Interaction.
  1342. * system:                               System Interaction.
  1343. * syswrite:                             System Interaction.
  1344. * tell:                                 Input/Output.
  1345. * telldir:                              Directory Reading Functions.
  1346. * time:                                 Time Functions.
  1347. * times:                                System Interaction.
  1348. * tr/SEARCHLIST/REPLACEMENTLIST/:       Search and Replace Functions.
  1349. * translate function:                   Search and Replace Functions.
  1350. * umask:                                System Interaction.
  1351. * undef:                                Variable Functions.
  1352. * unless:                               Simple Statements.
  1353. * unless:                               Compound Statements.
  1354. * unlink:                               File Operations.
  1355. * unpack:                               Structure Conversion.
  1356. * unshift:                              Array and List Functions.
  1357. * utime:                                File Operations.
  1358. * values:                               Array and List Functions.
  1359. * vec:                                  Miscellaneous Functions.
  1360. * wait:                                 System Interaction.
  1361. * waitpid:                              System Interaction.
  1362. * wantarray:                            Subroutine Functions.
  1363. * warn:                                 System Interaction.
  1364. * while:                                Simple Statements.
  1365. * while:                                Compound Statements.
  1366. * write:                                Input/Output.
  1367. * y/SEARCHLIST/REPLACEMENTLIST/:        Search and Replace Functions.
  1368.  
  1369.