home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sources.misc:3892 comp.lang.perl:5716
- Newsgroups: comp.sources.misc,comp.lang.perl
- Path: sparky!kent
- From: jv@mh.nl (Johan Vromans)
- Subject: v32i002: perlref - Perl Reference Guide 4.035.1, Part02/04
- Message-ID: <1992Sep4.023901.11943@sparky.imd.sterling.com>
- Followup-To: comp.sources.d
- X-Md4-Signature: 3d807c649ea5e54444c2b2a792f93f8c
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- References: <csm-v32i001=perlref.213734@sparky.IMD.Sterling.COM>
- Date: Fri, 4 Sep 1992 02:39:01 GMT
- Approved: kent@sparky.imd.sterling.com
- Lines: 1822
-
- Submitted-by: jv@mh.nl (Johan Vromans)
- Posting-number: Volume 32, Issue 2
- Archive-name: perlref/part02
- Supersedes: perlref: Volume 28, Issue 77-79
- Environment: Perl v4.035
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: Makefile refbase.tex
- # Wrapped by kent@sparky on Wed Sep 2 21:35:21 1992
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 2 (of 4)."'
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(3058 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X# @(#)@ Makefile 4.2.7 - Makefile for Perl Reference Guide
- X
- X# This Makefile requires perl to be in your PATH.
- X
- XSHELL = /bin/sh
- XLATEX = latex
- XDVIPS = dvips
- X
- X# Delete the next line if you use US Letter paper format
- XPAPER = -a4
- X
- Xall: refguide.ps
- X
- X2pass: guide-odd.ps guide-even1.ps guide-even2.ps
- X
- X# 2 pages per page, suitable for centrefold printing.
- Xrefguide.ps: refbase.ps parr
- X perl ./parr $(PAPER) \
- X -o 21,2,3,20,19,4,5,18,17,6,7,16,15,8,9,14,13,10,11,12 \
- X refbase.ps > refguide.ps
- X
- X# Odd and even passes for centerfold printing.
- X# First print guide-odd.ps, then find out which of the others to use.
- X# guide-even1.ps is for printers with correct output stacking like
- X# Apple LaserWriter II.
- X# guide-even2.ps for printers with reverse output stacking, like old
- X# Apple LaserWriters.
- X
- Xguide-odd.ps: refbase.ps parr
- X perl ./parr $(PAPER) \
- X -o 21,2,19,4,17,6,15,8,13,10 refbase.ps > guide-odd.ps
- X
- Xguide-even1.ps: refbase.ps parr
- X perl ./parr $(PAPER) \
- X -o 11,12,9,14,7,16,5,18,3,20 refbase.ps > guide-even1.ps
- X
- Xguide-even2.ps: refbase.ps parr
- X perl ./parr $(PAPER) \
- X -o 3,20,5,18,7,16,9,14,11,12 refbase.ps > guide-even2.ps
- X
- Xguide-test.ps: refbase.ps parr
- X perl ./parr $(PAPER) \
- X -o 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 refbase.ps > guide-test.ps
- X
- Xclean:
- X rm -f refguide.ps guide-odd.ps guide-even1.ps guide-even2.ps \
- X refbase.dvi core *~
- X
- X# For maintenance use only ...
- X
- XVER = 4.035
- X
- XCH = ch00.tex ch01.tex ch02.tex ch03.tex ch04.tex ch05.tex \
- X ch06.tex ch07.tex ch08.tex ch09.tex ch10.tex ch11.tex \
- X ch12.tex ch13.tex ch14.tex ch15.tex ch16.tex ch17.tex \
- X ch18.tex ch19.tex ch20.tex ch21.tex ch22.tex ch23.tex \
- X ch24.tex ch25.tex ch26.tex ch27.tex \
- X ch99.tex
- XSRC = refbase.tex refbase.sty
- XAUX = README ChangeLog Makefile parr Layout
- X
- X# Our TeX places its output here, never mind if yours doesn't.
- XTEXTMP = /usr/tmp/$(USER)TeX.
- X
- X# NOTE: DO NOT REMOVE OR CHANGE '-ta4' EVEN IF USING NON-A4 PAPER
- Xrefbase-ps: refbase.dvi
- X $(DVIPS) -r0 -ta4 refbase.dvi
- X
- X# -if [ -f psneat.pl ]; then \
- X# mv refbase.ps refbase.ps~; \
- X# perl ./psneat.pl refbase.ps~ > refbase.ps; \
- X# else true; \
- X# fi
- X
- Xrefbase.dvi: $(SRC)
- X $(LATEX) refbase.tex < /dev/null
- X -if [ -f $(TEXTMP)dvi ]; then \
- X mv $(TEXTMP)dvi refbase.dvi; \
- X else true; \
- X fi
- X
- XMASTER = ref
- Xrefbase-tex: $(MASTER)master.tex $(CH) makebase.pl
- X perl ./makebase.pl $(REV) $(MASTER)master.tex > refbase.tex
- X
- Xkit:
- X REV=`cat Revision.SEQ`; \
- X expr $$REV + 1 >Revision.SEQ; \
- X (echo ""; echo Revision: $(VER).$$REV; what $(SRC) $(CH)) >> Revision; \
- X $(MAKE) -$(MAKEFLAGS) REV=$$REV refbase-tex refbase-ps kitinternal
- X
- Xkitinternal:
- X rm -f perlref_shr.* perlref_ltx.* perlref-$(VER).$(REV).tar.Z
- X shar -c -n perlref-$(VER).$(REV) -a -s 'jv@mh.nl' \
- X -o perlref-$(VER).$(REV)_shr -L30 -f $(AUX) refbase.ps
- X shar -c -n perlltx-$(VER).$(REV) -a -s 'jv@mh.nl' \
- X -o perlref-$(VER).$(REV)_ltx -L30 -f $(AUX) $(SRC)
- X pdtar -zcvf perlref-$(VER).$(REV).tar.Z $(AUX) $(SRC) refbase.ps
- X ls -l perlref-*_shr.* perlref-*_ltx.* perlref-*.tar.Z
- X
- Xident:
- X what $(AUX) $(SRC)
- END_OF_FILE
- if test 3058 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'refbase.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'refbase.tex'\"
- else
- echo shar: Extracting \"'refbase.tex'\" \(48498 characters\)
- sed "s/^X//" >'refbase.tex' <<'END_OF_FILE'
- X\def\revision{1}
- X\documentstyle{refbase}
- X
- X\begin{document}
- X
- X
- X\begin{titlepage}
- X
- X\hbox{ }
- X\end{titlepage}
- X
- X\begin{titlepage}
- X\addtolength{\evensidemargin}{2cm}
- X\addtolength{\textwidth}{-2.1cm}
- X\vspace*{2.5cm}
- X
- X\unnumbered{Perl Reference Guide}
- X{\bf for Perl version \perlrev}
- X
- X\vskip1cm
- XPerl program designed and created by \\
- XLarry Wall \<lwall@netlabs.com\>
- X
- X\vskip1cm
- XReference guide designed and created by \\
- XJohan Vromans \<jv@mh.nl\>
- X
- X\vskip1.3cm
- X\unnumbered{Contents}
- X
- X\newcounter{xx}
- X\begin{list}{\thexx.}
- X{\setlength{\topsep}{0pt plus 1pt}
- X \setlength{\itemsep}{0pt plus 1pt}
- X \setlength{\parsep}{0pt plus 1pt}
- X \usecounter{xx}}
- X\item Command line options
- X\item Literals
- X\item Variables
- X\item Statements
- X\item Flow control
- X\item Operators
- X\item File test operators
- X\item Arithmetic functions
- X\item Conversion functions
- X\item Structure conversion
- X\item String functions
- X\item Array and list functions
- X\item File operations
- X\item Directory reading routines
- X\item Input / Output
- X\item Search and replace functions
- X\item System interaction
- X\item Networking
- X\item SystemV IPC
- X\item Miscellaneous
- X\item Formats
- X\item Info from system files
- X\item Regular expressions
- X\item Special variables
- X\item Special arrays
- X\item The perl debugger
- X\item Environment variables
- X\end{list}
- X\vskip1cm
- X{\catcode`\%=\other \small {Rev. \refrev}}
- X\end{titlepage}
- X
- X\unnumbered{Conventions}
- X
- X\begin{enum}{2cm}
- X\Xi{|fixed|} denotes literal text.
- X
- X\Xi{<this>} means variable text, i.e. things you must fill in.
- X
- X\Xi{<this>\dag} means that <this> will default to |$_| if omitted.
- X
- X\Xi{\kwd{word}} is a keyword, i.e. a word with a special meaning.
- X
- X\Xi{\fbox{<ret>}} denotes pressing a keyboard key.
- X
- X\Xi{[\ldots]} denotes an optional part.
- X
- X\Xi{(\ldots)*} means that the parentheses may be omitted.
- X
- X\end{enum}
- X
- X
- X\section{Command line options}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{|-a|} turns on autosplit mode when used with |-n| or
- X|-p|. Splits to |@F|.
- X
- X\Xi{|-c|} checks syntax but does not execute.
- X
- X\Xi{|-d|} runs the script under the debugger. Use |-de 0| to
- Xstart the debugger without a script.
- X
- X\Xi{|-D| <number>} sets debugging flags.
- X
- X\Xi{|-e| <commandline>} may be used to enter one line of
- Xscript. Multiple |-e| commands may be given to build up a
- Xmulti-line script.
- X
- X\Xi{|-i| <ext>} files processed by the |<>| construct are
- Xto be edited in-place.
- X
- X\Xi{|-I| <dir>} with |-P|: tells the C preprocessor where
- Xto look for include files. The directory is prepended to |@INC|.
- X
- X\Xi{|-l| [ <octnum> ] } enables automatic line ending processing, e.g. |-l013|.
- X
- X\Xi{|-n|} assumes an input loop around your script. Lines are not
- Xprinted.
- X
- X\Xi{|-p|} assumes an input loop around your script. Lines are
- Xprinted.
- X
- X\Xi{|-P|} runs the C preprocessor on the script before
- Xcompilation by perl.
- X
- X\Xi{|-s|} interprets ``|-xxx|'' on the command line as
- Xswitches and sets the corresponding variables \$|xxx| in the script.
- X
- X\Xi{|-S|} uses the |PATH| environment variable to search for
- Xthe script.
- X
- X\Xi{|-u|} dumps core after compiling the script. To be used with
- Xthe {\it undump\/} program (where available).
- X
- X\Xi{|-U|} allows perl to do unsafe operations.
- X
- X\Xi{|-v|} prints the version and patchlevel of your perl
- Xexecutable.
- X
- X\Xi{|-w|} prints warnings about possible spelling errors and
- Xother error-prone constructs in the script.
- X
- X\Xi{|-x|} extracts perl program from input stream.
- X
- X\Xi{|-0| <val>} (that's the number zero) designates an
- Xinitial value for the record terminator \$|/|.
- XSee also |-l|.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- X\section{Literals}
- X
- XNumeric: |123 1_234 123.4 5E-10 0xff| (hex)| 0377| (octal).
- X
- X\hangindent=2cm\hangafter=1
- XString: |'abc'| literal string, no variable interpolation nor
- Xescape characters.
- X\newline Also: |q/abc/|.
- X\newline (Almost any pair of delimiters can be used instead of |/.../|.)
- X
- X\hangindent=2cm\hangafter=1
- X\makebox[1cm]{}|"abc"|
- XVariables are interpolated and escape sequences are processed.
- X\newline Also: |qq/abc/|.
- X\newline Escape sequences: |\t| (Tab), |\n| (Newline), |\r| (Return),
- X|\f| (Formfeed), |\b| (Backspace), |\a| (Alarm), |\e|
- X(Escape), |\033|(octal), |\x1b|(hex), |\c[| (control).
- X\newline |\l| and |\u| lowcase/upcase the following character;
- X\newline |\L| and |\U| lowcase/upcase until a |\E| is encountered.
- X
- X
- X\hangindent=2cm\hangafter=1
- X\makebox[1cm]{}|`|<command>|`|
- Xevaluates to the output of the <command>.
- X\newline Also: |qx/|<command>|/|.
- X
- X\hangindent=1cm\hangafter=1
- XArray: |(1,2,3)|. |()| is an empty array.
- X\newline Also: |($a,$b,@rest) = (1,2,...);|
- X\newline |(1..4)| is the same as |(1,2,3,4)|. Likewise |('abc'..'ade')|
- X
- X\hangindent=1cm\hangafter=1
- XAssociative array:
- X|(|<key1>|,|<val1>|,|<key2>|,|<val2>|,...)|
- X
- X\hangindent=1cm\hangafter=1
- XFilehandles:
- X\newline Pre-defined: |<STDIN>|, |<STDOUT>|, |<STDERR>|, |<ARGV>|,
- X|<DATA>|;
- X\newline User-specified: |<|<handle>|>|, |<$|<var>|>|.
- X\newline |<>| is the input stream formed by the files specified in
- X|@ARGV|, or standard input if no arguments are supplied.
- X
- X\hangindent=1cm\hangafter=1
- XGlobs: |<|<pattern>|>| evaluates to all filenames according
- Xto the pattern.
- X\newline Use |<${|<var>|}>| to glob from a variable.
- X
- X\hangindent=1cm\hangafter=1
- XHere-Is: |<<|<identifier>
- X\newline {\it See the manual for details.}
- X
- X\hangindent=1cm\hangafter=1
- XSpecial tokens:
- X\newline \_\,\_|FILE|\_\,\_: filename; \_\,\_|LINE|\_\,\_: line number.
- X\newline \_\,\_|END|\_\,\_: end of program; remaining lines can be read using
- X\<<data>\>.
- X
- X
- X\section{Variables}
- X
- X\begin{enum}{3.2cm}
- X
- X\Xi{|\$var|} a simple scalar variable
- X
- X\Xi{|\$var[28]|} 29th element of array |@var| (the |[]| are
- Xpart of it)
- X
- X\Xi{|\$var\{'Feb'\}|} one value from associative array |%var|
- X
- X\Xi{|\$\#var|} last index of array |@var|
- X
- X\Xi{|@var|} the entire array;
- X\\
- Xin scalar context: the number of elements in the array
- X
- X\Xi{|@var[3,4,5]|} a slice of the array |@var|
- X
- X\Xi{|@var\{'a','b'\}|} a slice of |%var|; same as
- X|($var{'a'},$var{'b'})|
- X
- X\Xi{|\%var|} the entire associative array;
- X\\
- Xin scalar context: TRUE if the array has elements
- X
- X\Xj{|\$var\{'a',1,...\}|} emulates a multi-dimensional array
- X
- X\Xi{|('a'..'z')[4,7,9]|} a slice of an array literal
- X
- X\Xi{|*|<name>} refers to all objects represented by <name>.
- X``|*name1 = *name2|'' makes |name1| a reference to |name2|.
- X
- X\end{enum}
- X
- X
- X\section{Statements}
- X
- XEvery statement is an expression, optionally followed by a modifier,
- Xand terminated by a semicolon. The semicolon may be omitted if the
- Xstatement is the final one in a BLOCK.
- X
- XExecution of expressions can depend on other expressions using one of
- Xthe modifiers \kwd{if}, \kwd{unless}, \kwd{while} or \kwd{until},
- Xe.g.:
- X
- X\quad <expr1> \kwd{if} <expr2> |;| \\
- X\quad <expr1> \kwd{until} <expr2> |;|
- X
- XAlso, by using one of the logical operators \|\|, |&&| or |? :|, e.g.:
- X
- X\quad <expr1> \|\| <expr2> |;| \\
- X\quad <expr1> |?| <expr2> |:| <expr3> |;|
- X
- XStatements can be combined to form a <block> when enclosed in |{}|.
- X
- XCompound statements may be used to control flow:
- X
- X\quad \kwd{if} |(|<expr>|)| <block> [ [ \kwd{elsif}
- X |(|<expr>|)| <BLOCK ...> ] \kwd{else}
- X <block> ]
- X\\
- X\quad \kwd{unless} |(|<expr>|)| <block> [ \kwd{else}
- X <block> ]
- X\\
- X\quad [ <label>\kwd{:} ] \kwd{while} |(|<expr>|)|
- X <block> [ \kwd{continue} <block> ]
- X\\
- X\quad [ <label>\kwd{:} ] \kwd{until} |(|<expr>|)|
- X <block> [ \kwd{continue} <block> ]
- X\\
- X\quad [ <label>\kwd{:} ] \kwd{for} |(|<expr>|;|
- X <expr>|;| <expr>|)| <block>
- X\\
- X\quad [ <label>\kwd{:} ] \kwd{foreach} <var>\dag
- X |(|<array>|)| <block>
- X\\
- X\quad [ <label>\kwd{:} ] <block> [ \kwd{continue} < block> ]
- X
- XSpecial forms are:
- X
- X\quad \kwd{do} <block> \kwd{while} <expr> |;| \\
- X\quad \kwd{do} <block> \kwd{until} <expr> |;| \\
- X
- Xwhich are guaranteed to perform <block> once before testing <expr>.
- X
- X
- X
- X\section{Flow control}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{do} <block>}
- XReturns the value of the last command in the sequence of commands indicated by <block>. \kwd{next}, \kwd{last} and \kwd{redo}
- X cannot be used here.
- X
- X\Xi{\kwd{do} <subroutine>\kwd{(LIST)}}
- XExecutes a <subroutine> declared by a \kwd{sub} declaration, and
- Xreturns the value of the last expression evaluated in <subroutine> .
- X\newline Preferred form is: |&|<subroutine> .
- X
- X\Xi{\kwd{do} <FILENAME>}
- XExecutes the contents of <filename> as a perl script. Errors are
- Xreturned in |$@|.
- X\newline Preferred form is: \kwd{require} <filename> .
- X
- X\Xi{\kwd{goto} <label>}
- XContinue execution at the specified label.
- X
- X\Xi{\kwd{last} [<label>]}
- XImmediately exits the loop in question. Skips continue block.
- X
- X\Xi{\kwd{next} [<label>]}
- XStarts the next iteration of the loop.
- X
- X\Xi{\kwd{redo} [<label>]}
- XRestarts the loop block without evaluating the conditional again.
- X
- X\Xi{\kwd{return} <expr>}
- XReturns from a subroutine with the value specified.
- X
- X\end{enum}
- X
- X
- X\section{Operators}
- X
- X\begin{tabbing}
- X| |\=| |\= \kill
- X|+ -| \> |* /| \> Addition, subtraction, multiplication, division. \\
- X|%| \> \> Modulo division. \\
- X\| \& \> \^ \> Bitwise or, bitwise and, bitwise exclusive or. \\
- X|>>| \> |<<| \> Bitwise shift right, bitwise shift left. \\
- X|**| \> \> Exponentiation. \\
- X|.| \> \> Concatenation of two strings. \\
- X\kwd{x} \> \> Returns a string or array consisting of the left operand
- X(an array or \\
- X\> \> a string) repeated the number of times specified by the right operand.
- X\end{tabbing}
- X
- XAll of the above operators also have an assignment operator, e.g. ``|.=|''.
- X
- X\begin{tabbing}
- X| |\=| |\= \kill
- X|++| \> |--| \> Auto-increment (magical on strings), auto-decrement. \\
- X|? :|\> \> Alternation (if-then-else) operator. \\
- X\|\| \> \&\& \> Logical or, logical and. \\
- X|=|\,|=| \> |!=| \> Numeric equality, inequality. \\
- X\kwd{eq} \> \kwd{ne} \> String equality, inequality. \\
- X|<| \> |>| \> Numeric less than, greater than. \\
- X\kwd{lt} \> \kwd{gt} \> String less than, greater than. \\
- X|<=| \> |>=| \> Numeric less (greater) than or equal to. \\
- X\kwd{le} \> \kwd{ge} \> String less (greater) than or equal. \\
- X|<=>| \> \> Numeric compare. Returns -1, 0 or 1. \\
- X\kwd{cmp} \> \> String compare. Returns -1, 0 or 1. \\
- X|=~| \> |!~| \> Search pattern, substitution, or translation (negated). \\
- X|..| \> \> Enumeration, also input line range operator. \\
- X|,| \> \> Comma operator.
- X\end{tabbing}
- X
- X
- X\section{File test operators}
- X
- XThese unary operators takes one argument, either a filename or a
- Xfilehandle, and tests the associated file to see if something is true
- Xabout it. If the argument is omitted, tests |$_| (except for |-t,|
- Xwhich tests |STDIN|). If the special argument |_| (underscore) is
- Xpassed, uses the info of the preceding test.
- X
- X\begin{enum}{2.5cm}
- X
- X\Xi{|-r -w -x|} File is readable/writable/executable by effective uid/gid.
- X
- X\Xi{|-R -W -X|} File is readable/writable/executable by real uid/gid.
- X
- X\Xi{|-o -O|} File is owned by effective/real uid.
- X
- X\Xi{|-e -z|} File exists / has zero size.
- X
- X\Xi{|-s|} File exists and has non-zero size. Returns the size.
- X
- X\Xi{|-f -d|} File is a plain file, a directory.
- X
- X\Xi{|-l -S -p|} File is a symbolic link, a socket, a named pipe (FIFO).
- X
- X\Xi{|-b -c|} File is a block/character special file.
- X
- X\Xi{|-u -g -k|} File has setuid/setgid/sticky bit set.
- X
- X\Xi{|-t|} Tests if filehandle (|STDIN| by default) is opened to a tty.
- X
- X\Xi{|-T -B|} File is a text/non-text (binary) file. |-T| and |-B|
- Xreturn TRUE on a null file, or a file at EOF when testing a filehandle.
- X
- X\Xi{|-M -A -C|} File creation / access / inode change time. Measured
- Xin days since this program started. See also |$^T| in section
- X``Special~Variables''.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- XA <list> is a (possibly parenthesised) list of expressions, variables
- Xor <list>s. An array variable or an array slice may always be used
- Xinstead of a <list>.
- X
- X\section{Arithmetic functions}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{atan2(}<y>\kwd{,}<x>\kwd{)}}
- XReturns the arctangent of <Y>/<X> in the range -$\pi$ to $\pi$.
- X
- X\Xi{\kwd{cos(}\oEXPR \kwd{)}*}
- XReturns the cosine of <expr> (expressed in radians).
- X
- X\Xi{\kwd{exp(}\oEXPR \kwd{)}*}
- XReturns |e| to the power of <expr>.
- X
- X\Xi{\kwd{int(}\oEXPR \kwd{)}*}
- XReturns the integer portion of <expr>.
- X
- X\Xi{\kwd{log(}\oEXPR \kwd{)}*}
- XReturns natural logarithm (base |e|) of <expr>.
- X
- X\Xi{\kwd{rand}[\kwd{(}<expr>\kwd{)}*]}
- XReturns a random fractional number between 0 and the value of <expr>.
- XIf <expr> is omitted, returns a value between 0 and 1.
- X
- X\Xi{\kwd{sin(}\oEXPR \kwd{)}*}
- XReturns the sine of <expr> (expressed in radians).
- X
- X\Xi{\kwd{sqrt(}\oEXPR \kwd{)}*}
- XReturn the square root of <expr>.
- X
- X\Xi{\kwd{srand}[\kwd{(}<expr>\kwd{)}*]}
- XSets the random number seed for the rand operator.
- X
- X\Xi{\kwd{time}}
- XReturns the number of seconds since January 1, 1970. Suitable for
- Xfeeding to \kwd{gmtime} and \kwd{localtime}.
- X
- X\end{enum}
- X
- X
- X\section{Conversion functions}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{gmtime(}<expr>\kwd{)}*}
- XConverts a time as returned by the \kwd{time} function to a 9-element
- Xarray (\$sec, \$min, \$hour, \$mday, \$mon, \$year, \$wday,
- X\$yday, \$isdst) with the time analyzed for the Greenwich timezone.
- X\$mon has the range 0..11 and \$wday has the range 0..6.
- X
- X\Xi{\kwd{hex(}\oEXPR\kwd{)}*}
- XReturns the decimal value of <expr> interpreted as an hex string.
- X
- X\Xi{\kwd{localtime(}<expr>\kwd{)}*}
- XConverts a time as returned by the \kwd{time} function to a 9-element
- Xarray with the time analyzed for the local timezone.
- X
- X\Xi{\kwd{oct(}\oEXPR\kwd{)}*}
- XReturns the decimal value of <expr> interpreted as an octal string. If
- X<expr> starts off with |0x|, interprets it as a hex string instead.
- X
- X\Xi{\kwd{ord(}\oEXPR\kwd{)}*}
- XReturns the ascii value of the first character of <expr>.
- X
- X\Xi{\kwd{vec(}<expr>\kwd{,}<offset>\kwd{,}<bits>\kwd{)}}
- XTreats <expr> as a string of unsigned ints, and yields the bit at
- X<offset>. <bits> must be between 1 and 32. May be used as an lvalue.
- X
- X\end{enum}
- X
- X
- X\section{Structure conversion}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{pack(}<template>\kwd{,}<list>\kwd{)}}
- XPacks the values into a binary structure using <template>.
- X
- X\Xi{\kwd{unpack(}<template>\kwd{,}<expr>\kwd{)}}
- XUnpacks the structure <expr> into an array, using <template>.
- X
- X<template> is a sequence of characters as follows:
- X
- X\begin{tabbing}
- X| |\=|a |\=|/ |\=|A |\= \kill
- X \> |a| \> / \> |A| \> Ascii string, null / space padded \\
- X \> |b| \> / \> |B| \> Bit string in ascending / descending order \\
- X \> |c| \> / \> |C| \> Native / unsigned char value \\
- X \> |f| \> / \> |d| \> Single / double float in native format \\
- X \> |h| \> / \> |H| \> Hex string, low / high nybble first. \\
- X \> |i| \> / \> |I| \> Signed / unsigned integer value \\
- X \> |l| \> / \> |L| \> Signed / unsigned long value \\
- X \> |n| \> / \> |N| \> Short / long in network (big endian) byte order \\
- X \> |s| \> / \> |S| \> Signed / unsigned short value \\
- X \> |u| \> / \> |p| \> Uuencoded string / Pointer to a string \\
- X \> |v| \> / \> |V| \> Short / long in VAX (little endian) byte order \\
- X \> |x| \> / \> |@| \> Null byte / null fill until position \\
- X \> |X| \> \> \> Backup a byte
- X\end{tabbing}
- X
- XEach character may be followed by a decimal number which will be used
- Xas a repeat count, an |*| specifies all remaining arguments. \\
- XIf the format is preceded with |%|<n>, \kwd{unpack} returns an
- X<n>-bit checksum instead. \\
- XSpaces may be included in the template for readability purposes.
- X
- X\end{enum}
- X
- X
- X\section{String functions}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{chop(}<list>\dag\kwd{)}}
- XChops off the last character on all elements of the list; returns the
- Xlast chopped character. The parentheses may be omitted if <list> is a
- Xsingle variable.
- X
- X\Xi{\kwd{crypt(}<plaintext>\kwd{,}<salt>\kwd{)}}
- XEncrypts a string.
- X
- X\Xi{\kwd{eval(}\oEXPR \kwd{)}*}
- X<expr> is parsed and executed as if it were a perl program. The value
- Xreturned is the value of the last expression evaluated. If there is a
- Xsyntax error or runtime error, an undefined string is returned by
- X\kwd{eval}, and |$@| is set to the error message.
- X
- X\Xi{\kwd{eval\{}<expr>\kwd{;...\}}}
- XExecutes the code between \{ and \}. Traps runtime errors as described
- Xabove.
- X
- X\Xi{\kwd{index(}<str>\kwd{,}<substr>[\kwd{,}<offset>]\kwd{)}}
- XReturns the position of <substr> in <str> at or after <offset>. If the
- Xsubstring is not found, returns |$[-1|.
- X
- X\Xi{\kwd{length(}\oEXPR\kwd{)}*}
- XReturns the length in characters of the value of <expr>.
- X
- X\Xi{\kwd{rindex(}<str>\kwd{,}<substr>[\kwd{,}<offset>]\kwd{)}}
- XReturns the position of the last <substr> in <str> at or
- Xbefore <offset>.
- X
- X\Xi{\kwd{substr(}<expr>\kwd{,}<offset>[\kwd{,}<len>]\kwd{)}}
- XExtracts a substring out of <expr> and returns it. If <offset>
- Xis negative, counts from the end of the string. May be used as an lvalue.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- X\section{Array and list functions}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{delete} \$<array>\{<key>\}}
- XDeletes the specified value from the specified associative array.
- XReturns the deleted value.
- X
- X\Xi{\kwd{each(}|\%|<array>\kwd{)}*}
- XReturns a 2-element array consisting of the key and value for the next
- Xvalue of an associative array. Entries are returned in an apparently
- Xrandom order. When the array is entirely read, a null array is
- Xreturned. The next call to \kwd{each} after that will start iterating again.
- X
- X\Xi{\kwd{grep(}<expr>\kwd{,}<list>\kwd{)}}
- XEvaluates <expr> for each element of the <list>, locally setting |$_|
- Xto refer to the element. Modifying |$_| will modify the corresponding
- Xelement from <list>. Returns array of elements from <list> for which
- X<expr> returned true.
- X
- X\Xi{\kwd{join(}<expr>\kwd{,}<list>\kwd{)}}
- XJoins the separate strings of <list> into a single string with fields
- Xseparated by the value of <expr>, and returns the string.
- X
- X\Xi{\kwd{keys(}|\%|<array>\kwd{)}*}
- XReturns an array with of all the keys of the named
- Xassociative array.
- X
- X\Xi{\kwd{pop(}|@|<array>\kwd{)}*}
- XPops and returns the last value of the array, shortens the array by 1.
- X
- X\Xi{\kwd{push(}|@|<array>\kwd{,}<list>\kwd{)}}
- XPushes the values of <list> onto the end of <array>. The length of the
- Xarray increases by the length of <list>.
- X
- X\Xi{\kwd{reverse(}<list>\kwd{)}*}
- XIn array context: returns the <list> in reverse order. \\
- XIn scalar
- Xcontext: returns the first element of <list> with bytes reversed.
- X
- X\Xi{\kwd{scalar(}|@|<array>\kwd{)}}
- XReturns the number of elements in the array.
- X
- X\Xi{\kwd{scalar(}|\%|<array>\kwd{)}}
- XReturns TRUE if the associative array has elements defined.
- X
- X\Xi{\kwd{shift}[\kwd{(}|@|<array>\kwd{)}*]}
- XShifts the first value of the array off and returns it, shortening the
- Xarray by 1 and moving everything down. If |@|<array> is omitted, shifts
- X|@ARGV| in main and |@_| in subroutines.
- X
- X\Xi{\kwd{sort(} [<subroutine> ] <list>\kwd{)}*}
- XSorts the <list> and returns the sorted array value. If <subroutine>
- Xis specified, gives the name of a subroutine that returns less than
- Xzero, zero, or greater than zero, depending on how the elements of the
- Xarray, available to the routine as |$a| and |$b|, are to be ordered.
- X\\
- X<SUBROUTINE> may be the name of a user-defined routine, or a <block>
- X(see ``Statements'' and ``Miscellaneous'').
- X
- X\Xi{\kwd{splice(}|@|<array>\kwd{,}<offset>[\kwd{,}<length>[\kwd{,}<list>]]\kwd{)}}
- XRemoves the elements of |@|<array> designated by <offset> and
- X<length>, and replaces them with <list> (if specified). \\
- XReturns the elements removed.
- X
- X\Xi{\kwd{split}[\kwd{(}<pattern>[\kwd{,}\oEXPR [\kwd{,}<limit>]]\kwd{)}]}
- XSplits a string into an array of strings, and returns it. If <limit>
- Xis specified, splits in no more than that many fields. If <pattern> is
- Xalso omitted, splits on whitespace. If
- Xnot in array context: returns number of fields and splits to |@_|.
- XSee also: ``Search and Replace Functions''.
- X
- X\Xi{\kwd{unshift(}|@|<array>\kwd{,}<list>\kwd{)}}
- XPrepends list to the front of the array, and returns the number of
- Xelements in the new array.
- X
- X\Xi{\kwd{values(}|\%|<array>\kwd{)}*}
- XReturns a normal array consisting of all the values of the named
- Xassociative array.
- X
- X\end{enum}
- X
- X
- X
- X\makeupspace{1cm}
- X
- X\section{File operations}
- X
- XFunctions operating on a list of files return the number of files
- Xsuccessfully operated upon.
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{chmod(}<list>\kwd{)}*}
- XChanges the permissions of a list of files. The first element of the
- Xlist must be the numerical mode.
- X
- X\Xi{\kwd{chown(}<list>\kwd{)}*}
- XChanges the owner and group of a list of files. The first two elements
- Xof the list must be the numerical uid and gid.
- X
- X\Xi{\kwd{truncate(}<file>\kwd{,}<size>\kwd{)}}
- Xtruncates <file> to <size>. <file> may be a filename or a filehandle.
- X
- X\Xi{\kwd{link(}<oldfile>\kwd{,}<newfile>\kwd{)}}
- XCreates a new filename linked to the old filename.
- X
- X\Xi{\kwd{lstat(}<file>\kwd{)}}
- XLike stat, but does not traverse a final symbolic link.
- X
- X\Xi{\kwd{mkdir(}<dir>\kwd{,}<mode>\kwd{)}}
- XCreates a directory with given permissions. Sets |$!| on failure.
- X
- X\Xi{\kwd{readlink(}\oEXPR\kwd{)}*}
- XReturns the value of a symbolic link.
- X
- X\Xi{\kwd{rename(}<oldname>\kwd{,}<newname>\kwd{)}}
- XChanges the name of a file.
- X
- X\Xi{\kwd{rmdir(}<filename>\dag\kwd{)}*}
- XDeletes the directory if it is empty. Sets |$!| on failure.
- X
- X\Xi{\kwd{stat(}<file>\kwd{)}}
- XReturns a 13-element array (\$dev, \$ino, \$mode, \$nlink, \$uid, \$gid,
- X\$rdev, \$size, \$atime, \$mtime, \$ctime, \$blksize, \$blocks). <file> can
- Xbe a filehandle, an expression evaluating to a filename, or |_| to
- Xrefer to the last file test operation.
- X\\
- XReturns a null list if the \kwd{stat} fails.
- X
- X\Xi{\kwd{symlink(}<oldfile>\kwd{,}<newfile>\kwd{)}}
- XCreates a new filename symbolically linked to the old filename.
- X
- X\Xi{\kwd{unlink(}<list>\kwd{)}*}
- XDeletes a list of files.
- X
- X\Xi{\kwd{utime(}<list>\kwd{)}*}
- XChanges the access and modification times. The first two elements of
- Xthe list must be the numerical access and modification times.
- X
- X\end{enum}
- X
- X
- X
- X\makeuppage
- X
- X\section{Directory reading routines}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{closedir(}<dirhandle>\kwd{)}*}
- XCloses a directory opened by opendir.
- X
- X\Xi{\kwd{opendir(}<dirhandle>\kwd{,}<dirname>\kwd{)}}
- XOpens a directory on the handle specified.
- X
- X\Xi{\kwd{readdir(}<dirhandle>\kwd{)}*}
- XReturns the next entry (or an array of entries) in the directory.
- X
- X\Xi{\kwd{rewinddir(}<dirhandle>\kwd{)}*}
- XPositions the directory to the beginning.
- X
- X\Xi{\kwd{seekdir(}<dirhandle>\kwd{,}<pos>\kwd{)}}
- XSets position for readdir on the directory.
- X
- X\Xi{\kwd{telldir(}<dirhandle>\kwd{)}*}
- XReturns the postion in the directory.
- X
- X\end{enum}
- X
- X
- X\section{Input / Output}
- X
- XIn input/output operations, <filehandle> may be a filehandle as opened
- Xby the \kwd{open} operator, or a scalar variable which evaluates to
- Xthe name of a filehandle to be used.
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{binmode(}<filehandle>\kwd{)}*}
- XArranges for the file opened on <filehandle> to be read in ``binary''
- Xmode as opposed to ``text'' mode (MS-DOS only).
- X
- X\Xi{\kwd{close(}<filehandle>\kwd{)}*}
- XCloses the file or pipe associated with the file handle.
- X
- X\Xi{\kwd{dbmclose(}|\%|<array>\kwd{)}*}
- XBreaks the binding between the array and the dbm file.
- X
- X\Xi{\kwd{dbmopen(}|\%|<array>\kwd{,}<dbmname>\kwd{, }<mode>\kwd{)}}
- XBinds a dbm or ndbm file to the associative array. If the database
- Xdoes not exist, it is created with the indicated mode.
- X
- X\Xi{\kwd{eof(}<filehandle>\kwd{)}}
- XReturns 1 if the next read will return end of file, or if the file is
- Xnot open.
- X
- X\Xi{\kwd{eof}}
- XReturns the eof status for the last file read.
- X
- X\Xi{\kwd{eof( )}}
- XIndicates eof on the pseudo file formed of the files listed on the
- Xcommand line.
- X
- X\Xi{\kwd{fcntl(}<filehandle>\kwd{,}<function>\kwd{,}|\$|<var>\kwd{)}}
- XImplements the {\it fcntl\/}(2) function. This function has non-standard
- Xreturn values. See the manual for details.
- X
- X\Xi{\kwd{fileno(}<filehandle>\kwd{)}*}
- XReturns the file descriptor for a given (open) file.
- X
- X\Xi{\kwd{flock(}<filehandle>\kwd{,}<operation>\kwd{)}}
- XCalls {\it flock\/}(2) on the file. <operation> adds from 1 (shared), 2
- X(exclusive), 4 (non-blocking) or 8 (unlock).
- X
- X
- X\Xi{\kwd{getc}[\kwd{(}<filehandle>\kwd{)}*]}
- XYields the next character from the file, or |""| on EOF. If
- X<filehandle> is omitted, reads from |STDIN|.
- X
- X\Xi{\kwd{ioctl(}<filehandle>\kwd{,}<function>\kwd{,}|\$|<var>\kwd{)}}
- Xperforms {\it ioctl}(2) on the file. This function has non-standard
- Xreturn values. See the manual for details.
- X
- X\Xi{\kwd{open(}<filehandle>[\kwd{,}<filename>]\kwd{)}}
- XOpens a file and associates it with <filehandle>. If <filename> is
- Xomitted, the scalar variable of the same name as the <filehandle> must
- Xcontain the filename.
- X
- XThe following filename conventions apply when opening a file.
- X
- X\begin{enum}{2cm}
- X\Xi{|"|<file>|"|} open <file> for input. Also |"<|<file>|"|.
- X
- X\Xi{|">|<file>|"|} open <file> for output, creating it if necessary.
- X
- X\Xi{|">>|<file>|"|} open <file> in append mode.
- X
- X\Xi{|"+>|<file>|"|} open <file> with read/write access.
- X
- X\Xi{|"\||<cmd>|"|} opens a pipe to command <cmd>.
- X
- X\Xi{|"|<cmd>|\|"|} opens a pipe from command <cmd>.
- X\end{enum}
- X
- X<file> may be |&|<filehnd> in which case the new file handle is
- Xconnected to the (previously opened) filehandle <filehnd>.
- X
- X\kwd{open}
- Xreturns 1 upon success, \kwd{undef} otherwise, except for pipes. The
- Xparentheses may be omitted, if only a <filehandle> is specified.
- X
- X\Xi{\kwd{pipe(}<readhandle>\kwd{,}<writehandle>\kwd{)}}
- XReturns a pair of connected pipes.
- X
- X\Xi{\kwd{print}[\kwd{(}[<filehandle>]<list>\dag\kwd{)}*]}
- XPrints a string or a comma-separated list of strings. If <filehandle>
- Xis omitted, prints by default to standard output (or to the last
- Xselected output channel - see \kwd{select}).
- X
- X\Xi{\kwd{printf}[\kwd{(}[<filehandle>] <list>\kwd{)}*]}
- XEquivalent to \kwd{print} <filehandle> \kwd {sprintf(}<list>\kwd{)}.
- X
- X\Xi{\kwd{read(}<filehandle>\kwd{,}|\$|<var>\kwd{,}<length>[\kwd{,}<offset>]\kwd{)}}
- XRead <length> binary bytes from the file into the variable at
- X<offset>. Returns number of bytes actually read.
- X
- X\Xi{\kwd{seek(}<filehandle>\kwd{,}<position>\kwd{,}<whence>\kwd{)}}
- XArbitrarily positions the file. Returns 1 upon success, 0 otherwise.
- X
- X\Xi{\kwd{select}[\kwd{(}<filehandle>\kwd{)}]}
- XReturns the currently selected filehandle.
- XSets the current default filehandle for output operations if
- X<filehandle> is supplied.
- X
- X\Xi{\kwd{select(}<rbits>\kwd{,}<wbits>\kwd{,}<nbits>\kwd{,}<timeout>\kwd{)}}
- XPerforms a {\it select\/}(2) system call with the same parameters.
- X
- X\Xi{\kwd{sprintf(}<format>\kwd{,}<list>\kwd{)}}
- XReturns a string formatted by (almost all of) the usual printf
- Xconventions.
- X
- X\Xi{\kwd{sysread(}<filehandle>\kwd{,}|\$|<var>\kwd{,}<length>[\kwd{,}<offset>]\kwd{)}}
- XReads <length> bytes into |$|<var> at <offset>.
- X
- X\Xi{\kwd{syswrite(}<filehandle>\kwd{,}<scalar>\kwd{,}<length>[\kwd{,}<offset>]\kwd{)}}
- XWrites <length> bytes from <scalar> at <offset>.
- X
- X\Xi{\kwd{tell}[\kwd{(}<filehandle>\kwd{)}]*}
- XReturns the current file position for the file. If <filehandle> is
- Xomitted, assumes the file last read.
- X
- X\Xi{\kwd{write}[\kwd{(}<filehandle>\kwd{)}]*}
- XWrites a formatted record to the specified file, using the format
- Xassociated with that file. See ``Formats''.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- X\section{Search and replace functions}
- X
- X\begin{enum}{1cm}
- X
- X\catcode`\~=\other
- X
- X\Xi{[<expr> |=~|] [\kwd{m}]|/|<pattern>|/|[\kwd{g}][\kwd{i}][\kwd{o}]}
- XSearches <expr> (default: |$_|) for a pattern. If you prepend an
- X\kwd{m} you can use almost any pair of characters as delimiters. If
- Xused in array context, an array is returned consisting of the
- Xsubexpressions matched by the parentheses in pattern, i.e.
- X|($1,$2,$3,...)|.
- X\\
- XOptional modifiers: \kwd{g} matches as many times as possible; \kwd{i}
- Xsearches in a case-insensitive manner; \kwd{o} interpolates variables
- Xonly once.
- X\\
- XIf <pattern> is empty, the most recent pattern from a
- Xprevious match or replacement is used.
- X\\
- XWith \kwd{g} the match can be used as an iterator in scalar context.
- X
- X\Xi{|?|<pattern>|?|}
- XThis is just like the |/|<pattern>|/| search, except that it matches
- Xonly once between calls to the reset operator. If <pattern> is empty,
- Xthe most recent pattern from a previous match or replacement is used.
- X
- X\Xi{[|\$|<var> |=~|] \kwd{s}|/|<pattern>|/|<replacement>|/|[\kwd{g}][\kwd{i}][\kwd{e}][\kwd{o}]}
- XSearches a string for a pattern, and if found, replaces that pattern
- Xwith the replacement text and returns the number of substitutions
- Xmade. Otherwise it returns false.
- X\\
- XOptional modifiers: \kwd{g} replaces all occurrences of the pattern;
- X\kwd{e} interprets the replacement string as an expression; \kwd{i}
- Xand \kwd{o} as with |/|<pattern>|/| matching. Almost any delimiter may
- Xreplace the slashes; if single quotes are used, no interpretation is
- Xdone on the replacement string.
- X\\
- XIf bracketing quotes are used, <pattern> and <replacement>
- Xmay have their own delimiters, e.g. |s(foo)[bar]|.
- X\\
- XIf <pattern> is empty, the most recent pattern from a previous match or replacement is used.
- X
- X\Xi{\kwd{study}[\kwd{(}|\$|<var>\dag\kwd{)}*]}
- XStudy the contents of |$|<var> in anticipation of doing many pattern
- Xmatches on the contents before it is next modified.
- X
- X\Xi{[|\$|<var> |=~|] \kwd{tr}|/|<searchlist>|/|<replacementlist>|/|[\kwd{c}][\kwd{d}][\kwd{s}]}
- XTranslates all occurrences of the characters found in the search list
- Xwith the corresponding character in the replacement list. It returns
- Xthe number of characters replaced. \kwd{y} may be used instead of \kwd{tr}.
- X\\
- XOptional modifiers: \kwd{c} complements the <searchlist>; \kwd{d}
- Xdeletes all characters not found in <searchlist>; \kwd{s} squeezes all
- Xsequences of characters that are translated into the same target
- Xcharacter into one occurrence of this character.
- X
- X\end{enum}
- X
- X\makeupspace{1cm}
- X
- X\section{System interaction}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{alarm(}<expr>\kwd{)}*}
- XSchedules a |SIGALRM| to be delivered after <expr> seconds.
- X
- X\Xi{\kwd{chdir} [\kwd{(}<expr>\kwd{)}*]}
- XChanges the working directory, |$ENV{"HOME"}| if <expr> is omitted.
- X
- X\Xi{\kwd{chroot(}<filename>\dag\kwd{)}*}
- XChanges the root directory for the process and its children.
- X
- X\Xi{\kwd{die}[\kwd{(}<list>\kwd{)}*]}
- XPrints the value of <list> to |STDERR| and exits with the current
- Xvalue of |$!| (errno). If |$!| is 0, exits with the value of |($? >> 8)|.
- XIf |($? >> 8)| is 0, exits with 255. <list> defaults to
- X|"Died."|.
- X
- X\Xi{\kwd{exec(}<list>\kwd{)}*}
- XExecutes the system command in <list>; does not return.
- X
- X\Xi{\kwd{exit(}<expr>\kwd{)}*}
- XExits immediately with the value of |EXPR|.
- X
- X\Xi{\kwd{fork}}
- XDoes a {\it fork\/}(2) system call. Returns the child pid to the parent
- Xprocess and zero to the child process.
- X
- X\Xi{\kwd{getlogin}}
- XReturns the current login name as known by the system.
- X
- X\Xi{\kwd{getpgrp}[\kwd{(}<pid>\kwd{)}*]}
- XReturns the process group for process <pid> (0, or omitted, means the
- Xcurrent process).
- X
- X\Xi{\kwd{getppid}}
- XReturns the process id of the parent process.
- X
- X\Xi{\kwd{getpriority(}<which>\kwd{,}<who>\kwd{)}}
- XReturns the current priority for a process, process group, or user.
- X
- X\Xi{\kwd{kill(}<list>\kwd{)}*}
- XSends a signal to a list of processes. The first element of the list
- Xmust be the signal to send (numeric, or its name as a string).
- X
- X\Xi{\kwd{setpgrp(}<pid>\kwd{,}<pgrp>\kwd{)}}
- XSets the process group for the <pid> (0 = current process).
- X
- X\Xi{\kwd{setpriority(}<which>\kwd{,}<who>\kwd{,}<prio>\kwd{)}}
- XSets the current priority for a process, process group, or a user.
- X
- X\Xi{\kwd{sleep}[\kwd{(}<expr>\kwd{)}*]}
- XCauses the script to sleep for <expr> seconds, or forever if no
- X<expr>. Returns the number of seconds actually slept.
- X
- X\Xi{\kwd{syscall(}<list>\kwd{)}*}
- XCalls the system call specified in the first element of the list,
- Xpassing the rest of the list as arguments to the call.
- X
- X\Xi{\kwd{system(}<list>\kwd{)}*}
- XDoes exactly the same thing as \kwd{exec }<list> except that a fork is
- Xdone first, and the parent process waits for the child process to complete.
- X
- X\Xi{\kwd{times}}
- XReturns a 4-element array (\$user, \$system, \$cuser, \$csystem) giving
- Xthe user and system times, in seconds, for this process and the
- Xchildren of this process.
- X
- X\Xi{\kwd{umask}[\kwd{(}<expr>\kwd{)}*]}
- XSets the umask for the process and returns the old one. If <expr> is
- Xomitted, returns current umask value.
- X
- X\Xi{\kwd{wait}}
- XWaits for a child process to terminate and returns the pid of the
- Xdeceased process (-1 if none). The status is returned in |$?|.
- X
- X\Xi{\kwd{waitpid(}<pid>\kwd{,}<flags>\kwd{)}}
- XPerforms the same function as the corresponding system call.
- X
- X\Xi{\kwd{warn(}<list>\kwd{)}*}
- XPrints the message on |STDERR| like \kwd{die}, but doesn't exit.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- X\section{Networking}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{accept(}<newsocket>\kwd{,}<genericsocket>\kwd{)}}
- XAccepts a new socket.
- X
- X\Xi{\kwd{bind(}<socket>\kwd{,}<name>\kwd{)}}
- XBinds the <name> to the <socket>.
- X
- X\Xi{\kwd{connect(}<socket>\kwd{,}<name>\kwd{)}}
- XConnects the <name> to the <socket>.
- X
- X\Xi{\kwd{getpeername(}<socket>\kwd{)}}
- XReturns the socket address of the other end of the <socket>.
- X
- X\Xi{\kwd{getsockname(}<socket>\kwd{)}}
- XReturns the name of the socket.
- X
- X\Xi{\kwd{getsockopt(}<socket>\kwd{,}<level>\kwd{,}<optname>\kwd{)}}
- XReturns the socket options.
- X
- X\Xi{\kwd{listen(}<socket>\kwd{,}<queuesize>\kwd{)}}
- XStarts listening on the specified <socket>.
- X
- X\Xi{\kwd{recv(}<socket>\kwd{,}<scalar>\kwd{,}<length>\kwd{,}<flags>\kwd{)}}
- XReceives a message on <socket>.
- X
- X\Xi{\kwd{send(}<socket>\kwd{,}<msg>\kwd{,}<FLAGS[>\kwd{,}<to>]\kwd{)}}
- XSends a message on the <socket>.
- X
- X\Xi{\kwd{setsockopt(}<socket>\kwd{,}<level>\kwd{,}<optname>\kwd{,}<optval>\kwd{)}}
- XSets the requested socket option.
- X
- X\Xi{\kwd{shutdown(}<socket>\kwd{,}<how>\kwd{)}}
- XShuts down a <socket>.
- X
- X\Xi{\kwd{socket(}<socket>\kwd{,}<domain>\kwd{,}<type>\kwd{,}<protocol>\kwd{)}}
- XCreates a <socket> in <domain> with <type> and <protocol>.
- X
- X\Xi{\kwd{socketpair(}<socket1>\kwd{,}<socket2>\kwd{,}<domain>\kwd{,}<type>\kwd{,}<protocol>\kwd{)}}
- XAs socket, but creates a pair of bi-directional sockets.
- X
- X\end{enum}
- X
- X\makeupspace{1cm}
- X
- X\section{SystemV IPC}
- X
- XThe following functions all perform the same action as the
- Xcorresponding system calls.
- X
- X\kwd{msgctl(}<id>\kwd{,}<cmd>\kwd{,}<args>\kwd{)} \\
- X\kwd{msgget(}<key>\kwd{,}<flags>\kwd{)} \\
- X\kwd{msgsnd(}<id>\kwd{,}<msg>\kwd{,}<flags>\kwd{)} \\
- X\kwd{msgrcv(}<id>\kwd{,}\$<var>\kwd{,}<size>\kwd{,}<type>\kwd{,}<flags>\kwd{)} \\
- X\kwd{semctl(}<id>\kwd{,}<semnum>\kwd{,}<cmd>\kwd{,}<arg>\kwd{)} \\
- X\kwd{semget(}<key>\kwd{,}<nsems>\kwd{,}<size>\kwd{,}<flags>\kwd{)} \\
- X\kwd{semop(}<key>\kwd{,}...\kwd{)} \\
- X\kwd{shmctl(}<id>\kwd{,}<cmd>\kwd{,}<arg>\kwd{)} \\
- X\kwd{shmget(}<key>\kwd{,}<size>\kwd{,}<flags>\kwd{)} \\
- X\kwd{shmread(}<id>\kwd{,}\$<var>\kwd{,}<pos>\kwd{,}<size>\kwd{)} \\
- X\kwd{shmwrite(}<id>\kwd{,}<string>\kwd{,}<pos>\kwd{,}<size>\kwd{)}
- X
- X\makeuppage
- X
- X\section{Miscellaneous}
- X
- X\begin{enum}{1cm}
- X
- X\Xi{\kwd{caller}[\kwd{(}<expr>\kwd{)}]}
- XReturns an array (\$package,\$file,\$line,...) for a specific subroutine
- Xcall. ``|caller|'' returns this info for the current subroutine,
- X``|caller(1)|'' for the caller of this subroutine etc..
- X
- X\Xi{\kwd{defined(}<expr>\kwd{)}*}
- XTests whether the lvalue <expr> has a real value.
- X
- X\Xi{\kwd{dump} [<label>]}
- XImmediate core dump. When reincarnated, starts at <label>.
- X
- X\Xi{\kwd{local(}<list>\kwd{)}}
- XCreates a scope for the listed variables local to the enclosing block,
- Xsubroutine or eval.
- X
- X\Xi{\kwd{package} <name>}
- XDesignates the remainder of the current block as a package.
- X
- X\Xi{\kwd{require(}\oEXPR\kwd{)}*}
- XIncludes the specified file from the perl library. Does not include
- Xmore than once, and yields a fatal error if the file does not include OK.
- X
- X\Xi{\kwd{reset} [\kwd{(}<expr>\kwd{)}*]}
- XResets |??| searches so that they work again. <expr> is a list of
- Xsingle letters. All variables and arrays beginning with one of those
- Xletters are reset to their pristine state. Only affects the current
- Xpackage.
- X
- X\Xi{\kwd{scalar(}<expr>\kwd{)}}
- XForces evaluation of <expr> in scalar context.
- X
- X\Xi{\kwd{sub} <name> \{ <expr> |;| ... \}}
- XDesignates <name> as a subroutine. Parameters are passed by reference
- Xas array |@_|. Returns the value of the last expression evaluated.
- X
- X\Xi{\kwd{undef}[\kwd{(}<lvalue>\kwd{)}*]}
- XUndefines the <lvalue>. Always returns the undefined value.
- X
- X\Xi{\kwd{wantarray}}
- XReturns true if the current context expects an array value.
- X
- X\end{enum}
- X
- X
- X\section{Formats}
- X
- X\kwd{format} [<name>] |=| \\
- X<formlist> \\
- X|.|
- X
- X<formlist> pictures the lines, and contains the arguments which will
- Xgive values to the fields in the lines. Picture fields are:
- X
- X| @<<<... | left adjusted field, repeat the |<| to denote the desired
- Xwidth; \\
- X| @>>>... | right adjusted field; \\
- X| @|\|\|\||... | centered field; \\
- X| @#.##... | numeric format with implied decimal point; \\
- X| @* | a multi-line field.
- X
- XUse \^ instead of |@| for multi-line block filling.
- X
- XUse |~| at the beginning of a line to suppress unwanted empty lines.
- X
- XUse |~~| at the beginning of a line to have this format line repeated
- Xuntil all fields are exhausted.
- X
- XUse |$-| to zero to force a page break.
- X
- XSee also |$|\^, |$~|, |$-| and |$=| in section ``Special Variables''.
- X
- X
- X\section{Info from system files}
- XSee the manual about return values in scalar context.
- X
- X{\large\sl passwd} \\
- XReturns (\$name, \$passwd, \$uid, \$gid, \$quota, \$comment, \$gcos, \$dir, \$shell).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endpwent}} Ends lookup processing.
- X
- X\Xi{\kwd{getpwent}} Gets next info.
- X
- X\Xi{\kwd{getpwnam(}<name>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{getpwuid(}<uid>\kwd{)}} Gets info by uid.
- X
- X\Xi{\kwd{setpwent}} Resets lookup processing.
- X
- X\end{enum}
- X
- X{\vskip6pt\large\sl group} \\
- XReturns (\$name, \$passwd, \$gid, \$members).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endgrent}} Ends lookup processing.
- X
- X\Xi{\kwd{getgrgid(}<gid>\kwd{)}} Gets info by group id.
- X
- X\Xi{\kwd{getgrnam(}<name>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{getgrent}} Gets next info.
- X
- X\Xi{\kwd{setgrent}} Resets lookup processing.
- X
- X\end{enum}
- X
- X{\vskip6pt\large\sl hosts} \\
- XReturns (\$name, \$aliases, \$addrtype, \$length, @addrs).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endhostent}} Ends lookup processing.
- X
- X\Xi{\kwd{gethostbyaddr(}<addr>\kwd{,}<addrtype>\kwd{)}} Gets info by address.
- X
- X\Xi{\kwd{gethostbyname(}<name>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{gethostent}} Gets next info.
- X
- X\Xi{\kwd{sethostent(}<stayopen>\kwd{)}} Resets lookup processing.
- X
- X\end{enum}
- X
- X{\vskip6pt\large\sl networks} \\
- XReturns (\$name, \$aliases, \$addrtype, \$net).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endnetent}} Ends lookup processing.
- X
- X\Xi{\kwd{getnetbyaddr(}<addr>\kwd{,}<type>\kwd{)}} Gets info by address and type.
- X
- X\Xi{\kwd{getnetbyname(}<name>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{getnetent}} Gets next info.
- X
- X\Xi{\kwd{setnetent(}<stayopen>\kwd{)}} Resets lookup processing.
- X
- X\end{enum}
- X
- X{\vskip6pt\large\sl services} \\
- XReturns (\$name, \$aliases, \$port, \$proto).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endservent}} Ends lookup processing.
- X
- X\Xi{\kwd{getservbyname(}<name>\kwd{, }<proto>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{getservbyport(}<port>\kwd{, }<proto>\kwd{)}} Gets info by port.
- X
- X\Xi{\kwd{getservent}} Gets next info.
- X
- X\Xi{\kwd{setservent(}<stayopen>\kwd{)}} Resets lookup processing.
- X
- X\end{enum}
- X
- X{\vskip6pt\large\sl protocols} \\
- X
- XReturns (\$name, \$aliases, \$proto).
- X
- X\begin{enum}{6cm}
- X
- X\Xi{\kwd{endprotoent}} Ends lookup processing.
- X
- X\Xi{\kwd{getprotobyname(}<name>\kwd{)}} Gets info by name.
- X
- X\Xi{\kwd{getprotobynumber(}<number>\kwd{)}} Gets info by number.
- X
- X\Xi{\kwd{getprotoent}} Gets next info.
- X
- X\Xi{\kwd{setprotoent(}<stayopen>\kwd{)}} Resets lookup processing.
- X
- X\end{enum}
- X
- X
- X\section{Regular expressions}
- X
- XEach character matches itself, unless it is one of the special
- Xcharacters |+?.*()[]{}|\||\|.
- X
- X\begin{enum}{1cm}
- X
- X\Xj{|.|}
- Xmatches an arbitrary character, but not a newline.
- X
- X\Xj{|(|\ldots|)|}
- Xgroups a series of pattern elements to a single element.
- X
- X\Xj{|+|}
- Xmatches the preceding pattern element one or more times.
- X
- X\Xj{|?|}
- Xmatches zero or one times.
- X
- X\Xj{|*|}
- Xmatches zero or more times.
- X
- X\Xj{\{<n>|,|<m>\}}
- Xdenotes the minimum <n> and maximum <m> match count. |{|<n>|}| means
- Xexactly <n> times; |{|<n>|,}| means at least <n> times.
- X
- X\Xj{|\char`\[|\ldots|\char`\]|}
- Xdenotes a class of characters to match. |[|\^\ldots|]| negates the class.
- X
- X\Xj{|(|\ldots\|\ldots\|\ldots|)|}
- Xmatches one of the alternatives.
- X
- X\end{enum}
- X
- XNon-alphanumerics can be escaped from their special meaning using a
- X|\|.
- X
- X\begin{enum}{1cm}
- X
- X\Xj{|\char`\\w|}
- Xmatches alphanumeric, including ``|_|'', |\W| matches non-alphanumeric.
- X
- X\Xj{|\char`\\b|}
- Xmatches word boundaries, |\B| matches non-boundaries.
- X
- X\Xj{|\char`\\s|}
- Xmatches whitespace, |\S| matches non-whitespace.
- X
- X\Xj{|\char`\\d|}
- Xmatches numeric, |\D| matches non-numeric.
- X
- X\Xj{|\char`\\n|, |\char`\\r|, |\char`\\f|, |\char`\\t| etc.}
- Xhave their usual meaning.
- X
- X\Xj{|\char`\\w|, |\char`\\s| and |\char`\\d|}
- X may be used within character classes, |\b| denotes backspace in this context.
- X
- X\Xj{|\char`\\1|\ldots|\char`\\9|}
- Xrefer to matched sub-expressions, grouped with |()|, inside
- Xthe match.
- X
- X\Xj{|\char`\\10|}
- Xand up can also be used if the pattern
- Xmatches that many sub-expressions.
- X
- X\end{enum}
- X
- XSee also |$1|\ldots|$9|, |$+|, |$&|, |$`| and |$'| in section ``Special
- XVariables''.
- X
- X
- X
- X\section{Special variables}
- X
- XThe following variables are global and should be localized in subroutines:
- X
- X\begin{enum}{1cm}
- X
- X\Xi{|\char`\$\char`\_|}
- XThe default input and pattern-searching space.
- X
- X\Xi{|\char`\$\char`\.|}
- XThe current input line number of the last filehandle that was read.
- X
- X\Xi{|\char`\$\char`\/|}
- XThe input record separator, newline by default. May be multi-character.
- X
- X\Xi{|\char`\$\char`\,|}
- XThe output field separator for the print operator.
- X
- X\Xi{|\char`\$\char`\"|}
- XThe separator which joins elements of arrays interpolated in strings.
- X
- X\Xi{|\char`\$\char`\\|}
- XThe output record separator for the print operator.
- X
- X\Xi{|\char`\$\char`\#|}
- XThe output format for printed numbers. Initial value is ``|%.20g|''.
- X
- X\Xi{|\char`\$\char`\*|}
- XSet to 1 to do multiline matching within a string, 0 to assume strings
- Xcontain a single line. Default is 0.
- X
- X\Xi{|\char`\$\char`\?|}
- XThe status returned by the last |`|<command>|`|, pipe close or
- X\kwd{system} operator.
- X
- X\Xi{|\char`\$\char`\]|}
- XThe perl version string (as displayed with |perl -v|), or version number.
- X
- X\Xi{|\char`\$\char`\[|}
- XThe index of the first element in an array, and of the first character
- Xin a substring. Default is 0.
- X
- X\Xi{|\char`\$\char`\;|}
- XThe subscript separator for multi-dimensional array emulation. Default
- Xis |"\034"|.
- X
- X\Xi{|\char`\$\char`\!|}
- XIf used in a numeric context, yields the current value of errno. If
- Xused in a string context, yields the corresponding error string.
- X
- X\Xi{|\char`\$\char`\@|}
- XThe perl error message from the last eval or \kwd{do} <expr> command.
- X
- X\Xi{|\char`\$\char`\:|}
- XThe set of characters after which a string may be broken to fill
- Xcontinuation fields (starting with ``|^|'') in a format.
- X
- X\Xi{|\char`\$\char`\0|}
- XThe name of the file containing the perl script being executed. May be
- Xassigned to.
- X
- X\Xi{|\char`\$\char`\$|}
- XThe process number of the perl running this script. Altered (in the
- Xchild process) by \kwd{fork}.
- X
- X\Xi{|\char`\$\char`\<|}
- XThe real uid of this process.
- X
- X\Xi{|\char`\$\char`\>|}
- XThe effective uid of this process.
- X
- X\Xi{|\char`\$\char`\(|}
- XThe real gid of this process.
- X
- X\Xi{|\char`\$\char`\)|}
- XThe effective gid of this process.
- X
- X\Xi{|\char`\$\char`\^D|}
- XThe debug flags as passed to perl using |-D| .
- X
- X\Xi{|\char`\$\char`\^F|}
- XThe highest system file descriptor, ordinarily 2.
- X
- X\Xi{|\char`\${\char`\^}I|}
- XIn-place edit extension as passed to perl using |-i| .
- X
- X\Xi{|\char`\$\char`\^L|}
- XFormfeed character used in formats.
- X
- X\Xi{|\char`\$\char`\^P|}
- XInternal debugging flag.
- X
- X\Xi{|\char`\$\char`\^T|}
- XThe time (as delivered by \kwd{time}) when the program started. This
- Xvalue is used by the file test operators ``|-M|'', ``|-A|'' and
- X``|-C|''.
- X
- X\Xi{|\char`\$\char`\^W|}
- XThe value if the |-w| option as passed to perl.
- X
- X\Xi{|\char`\$\char`\^X|}
- XThe name by which this perl was invoked.
- X
- X\end{enum}
- X
- XThe following variables are context dependent and need not be
- Xlocalized:
- X
- X\begin{enum}{1cm}
- X
- X\Xi{|\char`\$\char`\%|}
- XThe current page number of the currently selected output channel.
- X
- X\Xi{|\char`\$\char`\=|}
- XThe page length of the current output channel. Default is 60 lines.
- X
- X\Xi{|\char`\$\char`\-|}
- XThe number of lines left on the page.
- X
- X\Xi{|\char`\$\char`\~|}
- XThe name of the current report format.
- X
- X\Xi{|\char`\$\char`\^|}
- XThe name of the current top-of-page format.
- X
- X\Xi{|\char`\$\char`\||}
- XIf set to nonzero, forces a flush after every write or print on the
- Xcurrently selected output channel. Default is 0.
- X
- X\Xj{|\char`\$ARGV|}
- XThe name of the current file when reading from |<>| .
- X\end{enum}
- X
- XThe following variables are always local to the current block:
- X
- X\begin{enum}{1cm}
- X
- X\Xi{|\char`\$\char`\&|}
- XThe string matched by the last successful pattern match.
- X
- X\Xi{|\char`\$\char`\`|}
- XThe string preceding what was matched by the last successful match.
- X
- X\Xi{|\char`\$\char`\'|}
- XThe string following what was matched by the last successful match.
- X
- X\Xi{|\char`\$\char`\+|}
- XThe last bracket matched by the last search pattern.
- X
- X\Xi{\$|1|\ldots\$|9|\ldots}
- XContains the subpattern from the corresponding set of parentheses in
- Xthe last pattern successfully matched.
- X|$10|\ldots and up are only available if the
- Xmatch contained that many sub-expressions.
- X
- X\end{enum}
- X
- X
- X
- X
- X\section{Special arrays}
- X
- X\begin{enum}{1.5cm}
- X
- X\Xi{|@ARGV|}
- XContains the command line arguments for the script (not including the command name).
- X
- X\Xi{|@INC|}
- XContains the list of places to look for perl scripts to be evaluated
- Xby the \kwd{do} <filename> and \kwd{require} commands.
- X
- X\Xi{|@\char`\_|}
- XParameter array for subroutines. Also used by \kwd{split} if not in
- Xarray context.
- X
- X\Xi{|\char`\%ENV|}
- XContains the current environment.
- X
- X\Xi{|\char`\%INC|}
- XList of files that have been \kwd{require}d or \kwd{do}ne.
- X
- X\Xi{|\char`\%SIG|}Used to set signal handlers for various signals.
- X
- X\end{enum}
- X
- X
- X\section{The perl debugger}
- X
- XThe perl symbolic debugger is invoked with |perl -d|.
- X
- X\begin{enum}{2.5cm}
- X
- X\Xi{|h|}
- XPrints out a help message.
- X
- X\Xi{|T|}
- XStack trace.
- X
- X\Xi{|s|}
- XSingle steps.
- X
- X\Xi{|n|}
- XSingle steps around subroutine call.
- X
- X\Xi{|r|}
- XReturns from the current subroutine.
- X
- X\Xi{|c| [<line>]}
- XContinues (until <line>, or another breakpoint or exit).
- X
- X\Xi{\fbox{<ret>}}
- XRepeats last |s| or |n|.
- X
- X\Xi{|l| [<range>]}
- XLists a range of lines. <range> may be a number, start-end,
- Xstart+amount, or a subroutine name. If omitted, lists next window.
- X
- X\Xi{|f| <file>}
- XSwitches to <file> and start listing it.
- X
- X\Xi{|-|}
- XLists previous window.
- X
- X\Xi{|w|}
- XLists window around current line.
- X
- X\Xi{|l| <sub>}
- XLists the named <sub>routine.
- X
- X\Xi{|/|<pattern>|/|}
- XForward search for <pattern>.
- X
- X\Xi{|?|<pattern>|?|}
- XBackward search for <pattern>.
- X
- X\Xi{|L|}
- XLists lines that have breakpoints or actions.
- X
- X\Xi{|S|}
- XList the names of all subroutines.
- X
- X\Xi{|t|}
- XToggles trace mode.
- X
- X\Xi{|b| [<line> [<condition>]]}
- XSets breakpoint at <line>, default: current line.
- X
- X\Xi{|b| <subname> [<condition>]}
- XSets breakpoint at the subroutine.
- X
- X\Xi{|S|}
- XLists names of all subroutines.
- X
- X\Xi{|d| [<line>]}
- XDeletes breakpoint at the given line.
- X
- X\Xi{|D|}
- XDeletes all breakpoints.
- X
- X\Xi{|a| <line command>}
- XSets an action for line.
- X
- X\Xi{|A|}
- XDeletes all line actions.
- X
- X\Xi{|\char`\<| <command>}
- XSets an action to be executed before every debugger prompt.
- X
- X\Xi{|\char`\>| <command>}
- XSets an action to be executed before every |s|, |c| or |n| command.
- X
- X\Xi{|V| [<package> [<vars>] ]}
- XLists all variables in a package. Default package is main.
- X
- X\Xi{|X| [<vars>]}
- XLike |V|, but assumes current package.
- X
- X\Xi{|!| [ [-]<number>]}
- XRedo a debugging command. Default is previous command.
- X
- X\Xi{|H| [-<number>]}
- XDisplays the last -<number> commands of more than one letter.
- X
- X\Xi{|q|}
- XQuits. You may also use your \fbox{<eof>} character.
- X
- X\Xi{<command>}
- XExecutes <command> as a perl statement.
- X
- X\Xi{|p| \oEXPR}
- XPrints <expr>.
- X
- X\Xi{|=|< >[<alias value>]}
- XSets alias, or lists current aliases.
- X
- X\end{enum}
- X
- X\makeuppage
- X
- X\section{Environment variables}
- X
- XPerl uses the following environment variables.
- X
- X\begin{enum}{1.5cm}
- X
- X\Xi{|HOME|}
- XUsed if \kwd{chdir} has no argument.
- X
- X\Xi{|LOGDIR|}
- XUsed if \kwd{chdir} has no argument and |HOME| is not set.
- X
- X\Xi{|PATH|}
- XUsed in executing subprocesses, and in finding the perl script if |-S|
- Xis used.
- X
- X\Xi{|PERLLIB|}
- XA colon-separated list of directories to look for perl library files
- Xbefore looking in the standard library and the current directory.
- X
- X\Xi{|PERLDB|}
- XThe command to get the debugger code. Defaults to
- X\hbox{|require 'perldb.pl'|}.
- X
- X\end{enum}
- X
- X\makeupspace{1cm}
- X
- X\unnumbered{Notes}
- X\vfill
- X\makebox[\textwidth]{Perl Reference Guide Revision \refrev \hfill
- X\copyright 1989,1992 Johan Vromans}
- X
- X
- X\end{document}
- END_OF_FILE
- if test 48498 -ne `wc -c <'refbase.tex'`; then
- echo shar: \"'refbase.tex'\" unpacked with wrong size!
- fi
- # end of 'refbase.tex'
- fi
- echo shar: End of archive 2 \(of 4\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 4 archives.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-