home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
1
/
1455
(
.txt
)
< prev
next >
Wrap
LaTeX Document
|
1990-12-28
|
25KB
From: jv@mh.nl (Johan Vromans)
Newsgroups: comp.lang.perl,alt.sources
Subject: TeX version of the Perl Reference Guide - part 1 of 2
Message-ID: <JV.90Jun13103754@squirrel.mh.nl>
Date: 13 Jun 90 16:37:54 GMT
X-Checksum-Snefru: 9884ed9e ac92ddd9 df9a63ad 87bbe6c6
This is a TeX version of the information on the Perl Reference Guide,
based on guide version 3.0.18.2. It will create a printable copy of
the information on the Guide, but not its fancy formatting.
NOTE: This TeX document has been created by Raymond Chen
<raymond@math.berkeley.edu>. You should contact him for details
and remarks. I'm only passing it through.
Submitted-by: Raymond Chen <raymond@math.berkeley.edu>
Archive-name: perlref.tex/part01
---- Cut Here and unpack ----
#!/bin/sh
# This is perlref.tex, a shell archive (shar 3.24)
# made 06/13/1990 08:34 UTC by jv@squirrel
# Source directory /u/jv/perlref/TeX
# existing files WILL be overwritten
# This is part 1 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 37522 -rw-r--r-- perlref.tex
if touch 2>&1 | fgrep '[-amc]' > /dev/null
then TOUCH=touch
else TOUCH=true
if test -r shar3_seq_.tmp; then
echo "Must unpack archives in sequence!"
next=`cat shar3_seq_.tmp`; echo "Please unpack part $next next"
exit 1
# ============= perlref.tex ==============
echo "x - extracting perlref.tex (Text)"
sed 's/^X//' << 'SHAR_EOF' > perlref.tex &&
X% Perl Reference Guide (for perl version 3.0)
X% Perl designed and created by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
X% Reference guide designed and created by Johan Vromans <jv@mh.nl>
X% TeX version by Raymond Chen <raymond@math.berkeley.edu>
X% Copyright 1989, 1990 Johan Vromans
X% TeX version Copyright 1990 Raymond Chen
X% Rev. 3.0.18.1 Use and reproduction of this information is unlimited.
X% Changes to Johan's wording are marked by %%rjc%%
X%%%%%%%%%% This file uses one nonstandard font for the title page.
X% If you don't have it, then change the following \iffalse to \iftrue.
X\iffalse
X \let\twelvebf=\bf
X\else
X \font\twelvebf=cmbx12
X%%%%%%%%%% You may steal the following magic macros.
X% Magic:
X% |stuff| puts the stuff in \tt.
X% <stuff> puts the stuff in \it.
X%% verbatim macros
X\chardef\other=12
X\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other
X\catcode`\}=\other \catcode`\$=\other \catcode`\&=\other
X\catcode`\#=\other \catcode`\%=\other \catcode`\~=\other
X\catcode`\_=\other \catcode`\^=\other \catcode`\<=\other
X\obeyspaces \obeylines \tt}
X{\catcode`\|=\active
X\obeylines \gdef|{\leavevmode%
X \ttverbatim \spaceskip.5em plus.25em minus.15em%
X \let^^M=\ \let|=\endgroup \escapechar`\|}}
X\catcode`\|=\active
X\def\|{\leavevmode\hbox{\tt\char`\|}}
X\catcode`\<=\active
X\def<{\leavevmode\italicizerest}
X\def\italicizerest#1>{{\it#1\/}}
X\def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt%
X \hbox{\vphantom{\tt/}\thinspace{\tt#1}\thinspace}}%
X \kern1pt\hrule}\vrule}\thinspace}
X\catcode`\&=\active
X\let&=\undefined
X\def\*{$^\dagger$}
X\newdimen\tablewidth
X\def\table{\everypar={\nextitem}\parindent=0pt\tablewidth}
X\def\endtable{\everypar={}\par}
X\def\outtext{\everypar={\hangindent=3pc\relax}\parindent0pt\relax}
X\def\text{\everypar={}\parindent0pt\relax}
X\def\nextitem{\bgroup\let\par\means\obeylines\global\setbox0=\hbox\bgroup}
X\def\means{\enskip\egroup\egroup
X \ifdim\wd0>\tablewidth
X \hangindent\tablewidth
X \box0\hfill\break
X \hskip\tablewidth
X \else\hangindent\tablewidth
X \hbox to\tablewidth{\box0\hss}%
X \fi\ignorespaces}
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X\centerline{\twelvebf Perl Reference Guide}
X\centerline{\bf for perl version 3.0}
X\medskip
X\hbox to \hsize{\hss
X Perl program designed and
X created by Larry Wall |<lwall@jpl-devvax.jpl.nasa.gov>|\hss}
X\hbox to \hsize{\hss
X Reference guide designed and created by Johan Vromans |<jv@mh.nl>|\hss}
X\hbox to \hsize{\hss
X \TeX\ version by Raymond Chen |<raymond@math.berkeley.edu>|\hss}
X\medskip
X\centerline{Copyright \copyright 1989, 1990 Johan Vromans}
X\centerline{\TeX\ version Copyright 1990 Raymond Chen}
X\centerline{Rev. 3.0.18.1}
X\centerline{Use and reproduction of this information is unlimited.}
X\bigskip
X\centerline{\bf Contents}
X\bigskip
X\line{\hss\catcode`\?=\active \let?=\space
X\def\<#1. #2.{\hbox{#1\quad#2}}
X\vbox{
X\<?1. Command line options.
X\<?2. Literals.
X\<?3. Variables.
X\<?4. Statements.
X\<?5. Flow control.
X\<?6. Operators.
X\<?7. File test operators.
X\<?8. Arithmetic functions.
X\<?9. Conversion functions.
X\<10. Structure conversion.
X\<11. String functions.
X\<12. Array and list functions.
X}\qquad\vbox{
X\<13. File operations.
X\<14. Directory reading routines.
X\<15. Input/Output.
X\<16. Search and replace functions.
X\<17. System interaction.
X\<18. Networking.
X\<19. Miscellaneous.
X\<20. Info from system files.
X\<21. Regular expressions.
X\<22. Formats.
X\<23. Special variables.
X\<24. Special arrays.
X}\hss}
X\beginsection 1. Command line options
X\table1.2in
X|-a|
Xturns on autosplit mode when used with |-n| or |-p|. Splits to |@F|.
X|-d|
Xruns the script under the debugger. Use ``|-de 0|'' to start the
Xdebugger without a script.
X|-D|<number>
Xsets debugging flags.
X|-e| <commandline>
X may be used to enter one line of script. Multiple
X |-e| commands may be given to build up a multi-line script.
X|-i|<extension>
X specifies that files processed by
X the |<>| construct are to be edited in-place.
X|-I|<directory>
X with |-P|: tells the C preprocessor where to look
X for include files.
X|-n|
Xassumes an input loop around your script. Lines are not printed.
X|-p|
Xassumes an input loop around your script. Lines are printed.
X|-P|
Xruns the C preprocessor on the script before compilation by perl.
X|-s|
X interprets ``|-xxx|'' on the command line as switches and sets the
X corresponding variables |$xxx| in the script.
X|-S|
Xuses the |PATH| environment variable to search for the script.
X|-u|
Xdumps core after compiling the script.
X|-U|
Xallows perl to do unsafe operations.
X|-v|
Xprints the version and patchlevel of your perl executable.
X|-w|
X prints warnings about possible spelling errors and other error-prone
X constructs in the script.
X\endtable
X\beginsection 2. Literals
X\outtext
XNumeric: |123|, |123.4|, |5E-10|, |0xff| (hex), |0377| (octal).
XString: |"abc"|, |'abc'|.
X Variables are interpolated when |"|\dots|"| are used. \hfil\break
X |q/|\dots|/|
X can be used instead of |'|\dots|'|, |qq/|\dots|/| instead of |"|\dots|"|,
X (any delimiter instead of |/|\dots|/|).
XArray: |(1,2,3)|. |()| is empty array.
X Also: |($a,$b,@rest) = (1,2,|\dots|);|
X Enums are fine: |(1..4)| is |(1,2,3,4)|. Likewise |('abc'..'ade')|.
XFilehandles:
X|<STDIN>|, |<STDOUT>|, |<STDERR>|, |<handle>|, |<$var>|.
X|<>| is the input stream formed by the files specified in |@ARGV|,
Xor |STDIN| if no arguments are supplied.
XGlobs:
X|<pattern>| evaluates to all filenames according to the pattern.
XUse |<${var}>| to glob from a variable.
XCommands:
X|`command`| evaluates to the output of the command.
XHere-Is: |<<identifier| |#| the identifier must follow |<<| immediately
X \hfill\break
X{\it input text} \hfill\break
X|identifier|
X\beginsection 3. Variables
X\table 1.2in
X|$var|
X a simple scalar variable
X|$var[28]|
X 29th element of array |@var| (the |[]| are part of it)
X|$var{'Feb'}|
X one value from associative array |%var|
X|$#var|
X last index of array |@var|
X|@var|
X the entire array
X|@var[3,4,5]|
X a slice of the array |@var|
X|@var{'a','b'}|
X a slice of |%var|; same as |($var{'a'},$var{'b'})|
X|%var|
X the entire associative array
X|$var{'a',1,|\dots|}|
X emulates a multi-dimensional array
X|('a',1,|\dots|)[4]|
X subscripts an array literal
X|*name|
X refers to all objects represented by name. \hfil\break
X ``|*name1 = *name2|'' makes |name1| identical to |name2|.
X\endtable
X\beginsection 4. Statements
X\text
XEvery statement is an expression, optionally followed by a modifier, and
Xterminated by a semi-colon.
XExecution of expressions can depend on other expressions using one of
Xthe modifiers ``if'', ``unless'', ``while'' or ``until'', e.g.:
X$$\vbox{
X\hbox{<EXPR1> if <EXPR2>;}
X\hbox{<EXPR1> until <EXPR2>;}}$$
XAlso, by using one of the logical operators ``\|\|'', ``|&&|''
Xor ``|?:|'', e.g.:
X$$\vbox{
X\hbox{<EXPR1> \|\| <EXPR2>;}
X\hbox{<EXPR1> ? <EXPR2> : <EXPR3>;}}$$
XStatements can be combined to form a <BLOCK> when enclosed in |{}|.
XCompound statements may be used to control flow (|[]| denote optional
Xparts, \* means: defaults to |$_| if omitted):
X$$\vbox{
X\hbox{if (<EXPR>) <BLOCK> [ [ elsif (<EXPR>) <BLOCK> \dots\ ] else <BLOCK> ]}
X\hbox{unless (<EXPR>) <BLOCK> [ else <BLOCK> ]}
X\hbox{[<LABEL>:] while (<EXPR>) <BLOCK> [ continue <BLOCK> ]}
X\hbox{[<LABEL>:] until (<EXPR>) <BLOCK> [ continue <BLOCK> ]}
X\hbox{[<LABEL>:] for (<EXPR>; <EXPR>; <EXPR>) <BLOCK>}
X\hbox{[<LABEL>:] foreach <VAR>\*\ (<ARRAY>) <BLOCK>}
X\hbox{[<LABEL>:] <BLOCK> [ continue <BLOCK> ]}}$$
XSpecial forms are:
X$$\vbox{
X\hbox{do <BLOCK> while <EXPR>;}
X\hbox{do <BLOCK> until <EXPR>;}}$$
Xwhich are guaranteed to perform <BLOCK> once before testing <EXPR>.
X\beginsection 5. Flow control
X\table 1in
Xdo <BLOCK>
XReturns the value of the last command in the sequence of
Xcommands indicated by <BLOCK>.
Xdo <SUBROUTINE> (<LIST>)
XExecutes a <SUBROUTINE> declared by a |sub| declaration, and
Xreturns the value of the last expression evaluated in
X<SUBROUTINE>. Also: |&|<SUBROUTINE>.
Xdo <EXPR>
XUses the value of <EXPR> as a filename and executes the contents of
Xthe file as a perl script. Errors are returned in |$@|.
Xgoto <LABEL>
XContinue execution at the specified label.
Xlast [<LABEL>]
XImmediately exits the loop in question. Skips continue block.
Xnext [<LABEL>]
XStarts the next iteration of the loop.
Xredo [<LABEL>]
XRestarts the loop block without evaluating the conditional again.
Xreturn <EXPR>
XReturns from a subroutine with the value specified.
X\endtable
X\beginsection 6. Operators
X\table 1in
X|+| |-| |*| |/|
XAddition, subtraction, multiplication, division.
XModulo division.
X\| |&| |^|
XBitwise or, bitwise and, bitwise exclusive or.
X|>>| |<<|
XBitwise shift right, bitwise shift left.
X|**|
XExponentiation.
XConcatenation of two strings.
XReturns a string consisting of the left operand repeated the
Xnumber of times specified by the right operand.
X\medskip\noindent
XAll of the above operators also have an assignment operator, e.g. ``|.=|''.
X\medskip
X|++| |--|
XAuto-increment (magical on strings), auto-decrement.
X|?:|
XAlternation (if-then-else) operator.
X\|\| |&&|
XLogical or, logical and.
X|==| |!=|
XNumeric equality, inequality.
X|eq| |ne|
XString equality, inequality.
X|<| |>|
XNumeric less than, greater than.
X|lt| |gt|
XString less than, greater than.
X|<=| |>=|
XNumeric less (greater) than or equal to.
X|le| |ge|
XString less (greater) than or equal.
X|=~| |!~|
XSearch pattern, substitution, or translation (negated).
X|..|
XEnumeration, also input line range operator.
XComma operator.
X\endtable
X\beginsection 7. File test operators
X\text
X%%rjc%% Changed "This unary operator" to "These unary operators"
X%%rjc%% and concomitant grammar changes
XThese unary operators take one argument, either a filename or a
Xfilehandle, and test the associated file to see if something is true about
Xit. If the argument is omitted, tests |$_|
X(except for |-t|, which tests |STDIN|).
XIf the special argument |_| (underscore) is passed, uses the info of the
Xpreceding test.
X\medskip
X\table 1in
X|-r|/|-w|/|-x|/|-o|
XFile is readable/writable/executable/owned by effective uid.
X|-R|/|-W|/|-X|/|-O|
XFile is readable/writable/executable/owned by real uid.
X|-e|/|-z|/|-s|
XFile exists / has zero/non-zero size.
X|-f|/|-d|
XFile is a plain file, a directory.
X|-l|/|-S|/|-p|
XFile is a symbolic link, a socket, a named pipe (FIFO).
X|-b|/|-c|
XFile is a block/character special file.
X|-u|/|-g|/|-k|
XFile has setuid/setgid/sticky bit set.
X|-t|
XTests if filehandle (STDIN by default) is opened to a tty.
X|-T|/|-B|
XFile is a text/non-text (binary) file. Both |-T| and |-B| return
X<TRUE> on a null file, or a file at EOF when testing a
Xfilehandle.
X\text
X\medskip
XAn |*| after the parameter list indicates that this function may be used
Xeither as a function or as a unary operator, without the parentheses.
XThe symbol \*\ after a parameter indicates that this parameter will default
Xto |$_| if omitted.
X\beginsection 8. Arithmetic functions
X\table1.2in
Xatan2($X$,$Y$)
XReturns the arctangent of $X/Y$ in the range $-\pi$ to $\pi$.
Xcos(<EXPR>\*)*
XReturns the cosine of <EXPR> (expressed in radians).
Xexp(<EXPR>\*)*
XReturns e to the power of <EXPR>.
Xint(<EXPR>\*)*
XReturns the integer portion of <EXPR>.
Xlog(<EXPR>\*)*
XReturns natural logarithm (base $e$) of <EXPR>.
Xrand [(<EXPR>)*]
XReturns a random fractional number between 0 and the value of
X<EXPR>. If <EXPR> is omitted, returns a value between 0 and 1.
Xsin(<EXPR>\*)*
XReturns the sine of <EXPR> (expressed in radians).
Xsqrt(<EXPR>\*)*
XReturn the square root of <EXPR>.
Xsrand[(<EXPR>)*]
XSets the random number seed for the rand operator.
Xtime
XReturns the number of seconds since January 1, 1970. Suitable for
Xfeeding to gmtime(\dots) and localtime(\dots).
X\endtable
X\beginsection 9. Conversion functions
X\table 1.2in
Xgmtime(<EXPR>)*
XConverts a time as returned by the time function to a 9-element
Xarray |($sec, $min, $hour, $mday, $mon, $year, $wday, $yday,
X$isdst)| with the time analyzed for the Greenwich timezone. |$mon|
Xhas the range $0\ldots11$ and |$wday| has the range $0\ldots6$.
X%%rjc%% \* added
Xhex(<EXPR>\*)*
XReturns the decimal value of <EXPR> interpreted as an hex string.
Xlocaltime(<EXPR>)*
XConverts a time as returned by the time function to a 9-element
Xarray with the time analyzed for the local timezone.
X%%rjc%% \* added
Xoct(<EXPR>\*)*
XReturns the decimal value of <EXPR> interpreted as an octal string.
XIf <EXPR> starts off with 0x, interprets it as a hex string instead.
Xord(<EXPR>\*)*
XReturns the ascii value of the first character of <EXPR>.
Xvec(<EXPR>,<OFFSET>,<BITS>)
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
Xlvalue.
X\endtable
X\text
X\medskip
XA <LIST> is a (possibly parenthesised) list of expressions, variables or
X<LIST>s. In all circumstances, an array variable or an array slice may be
Xused instead of a <LIST>.
X\beginsection 10. Structure conversion
X\table 1.2in
Xpack(<TEMPLATE>,<LIST>)
XPacks the values into a binary structure using <TEMPLATE>.
Xunpack(<TEMPLATE>,<EXPR>)
XUnpacks the structure <EXPR> into an array, using <TEMPLATE>.
X\endtable
X\text
X\medskip
X<TEMPLATE> is a sequence of characters as follows:
X\table .4in
X|a|/|A|
X Ascii string, null/space padded
X|c|/|C|
X Native/unsigned char value
X|s|/|S|
X Signed/unsigned short value
X|i|/|I|
X Signed/unsigned integer value
X|l|/|L|
X Signed/unsigned long value
X|n|/|N|
X Short/long in network byte order
X Pointer to a string
X Null byte
X\endtable
X\text
X\medskip
XEach character may be followed by a decimal number which will be used
Xas a repeat count. Spaces may be included in the template for readability
Xpurposes.
X\beginsection 11. String functions
X\table 1.2in
Xchop(<LIST>\*)
XChops off the last character on all elements of the list; returns the
Xlast chopped character. The parentheses may be omitted if <LIST> is
Xa single variable.
Xcrypt(<PLAINTEXT>,<SALT>)
XEncrypts a string.
X%%rjc%%\* added
Xeval(<EXPR>\*)*
X<EXPR> is parsed and executed as if it were a little perl program.
XThe value returned is the value of the last expression evaluated. If
Xthere is a syntax error or runtime error, an undefined string is
Xreturned by eval, and |$@| is set to the error message.
Xindex(<STR>,<SUBSTR>)
XReturns the position of <SUBSTR> in <STR>. If the substring is not
Xfound, returns |$[|${}-1$.
X%%rjc%% \* added
Xlength(<EXPR>\*)*
XReturns the length in characters of the value of <EXPR>.
Xrindex(<STR>,<SUBSTR>)
XReturns the position of the last occurrence of <SUBSTR> in <STR>.
Xsubstr(<EXPR>,<OFFSET>,<LEN>)
XExtracts a substring out of <EXPR> and returns it. If <OFFSET> is
Xnegative, counts from the end of the string. May be used as an
Xlvalue.
X\endtable
X\beginsection 12. Array and list functions
X\table 1.2in
Xdelete |$|<ARRAY>$\{$<KEY>$\}$
XDeletes the specified value from the specified associative array.
XReturns the deleted value.
Xeach(|%|<ARRAY>)*
XReturns a 2-element array consisting of the key and value for the
Xnext value of an associative array. Entries are returned in an
Xapparently random order. When the array is entirely read, a null
Xarray is returned. The next call to each(\dots) after that will start
Xiterating again.
Xgrep(<EXPR>,<LIST>)
XEvaluates <EXPR> for each element of the <LIST>, locally setting |$_| to
Xrefer to the element. Modifying |$_| will modify the corresponding
Xelement from <LIST>. Returns array of elements from <LIST> for
Xwhich <EXPR> returned true.
Xjoin(<EXPR>,<LIST>)
XJoins the separate strings of <LIST> into a single string with fields
Xseparated by the value of <EXPR>, and returns the string.
Xkeys(|%|<ARRAY>)*
XReturns a normal array consisting of all the keys of the named
Xassociative array.
Xpop(|@|<ARRAY>)*
XPops and returns the last value of the array, shortens the array by 1.
Xpush(|@|<ARRAY>,<LIST>)
XPushes the values of <LIST> onto the end of <ARRAY>. The length of
X<ARRAY> increases by the length of <LIST>.
Xreverse(<LIST>)*
XReturns the <LIST> in reverse order.
Xshift[(|@|<ARRAY>)*]
XShifts the first value of the array off and returns it, shortening the
Xarray by 1 and moving everything down. If |@|<ARRAY> is omitted,
Xshifts |@ARGV| in main and |@_| in subroutines.
Xsort([<SUBROUTINE>] <LIST>)*
XSorts the <LIST> and returns the sorted array value. If
X<SUBROUTINE> is specified, gives the name of a subroutine that
Xreturns less than zero, zero, or greater than zero, depending on how
Xthe elements of the array, available to the routine as |$a| and |$b|, are
Xto be ordered.
Xsplice(|@|<ARRAY>,<OFFSET>[,<LENGTH>[,<LIST>]])
XRemoves the elements of |@|<ARRAY> designated by <OFFSET> and
X<LENGTH>, and replaces them with <LIST> (if specified).
XReturns the elements removed.
Xsplit[(/<PATTERN>/[,<EXPR>\*[,<LIMIT>]])]
XSplits a string into an array of strings, and returns it. If <LIMIT> is
Xspecified, splits in no more than that many fields. If <PATTERN> is
Xalso omitted, splits on whitespace (\hbox{|/[ \t\n]+/|}). If not in array
Xcontext: returns number of fields and splits to |@_|.
Xunshift(|@|<ARRAY>,<LIST>)
XPrepends list to the front of the array, and returns the number of
Xelements in the new array.
Xvalues(|%|<ARRAY>)*
XReturns a normal array consisting of all the values of the named
Xassociative array.
X\endtable
X\beginsection 13. File operations
X\text
XFunctions operating on a list of files return the number of files
Xsuccessfully operated upon.
X\medskip
X\table 1.2in
Xchmod(<LIST>)*
XChanges the permissions of a list of files. The first element of the
Xlist must be the numerical mode.
Xchown(<LIST>)*
XChanges the owner and group of a list of files. The first two
Xelements of the list must be the numerical uid and gid.
Xlink(<OLDFILE>,<NEWFILE>)
XCreates a new filename linked to the old filename.
Xlstat(<FILE>)
XLike stat, but does not traverse a final symbolic link.
Xmkdir(<DIR>,<MODE>)
XCreates a directory with given permissions. Sets |$!| on failure.
Xselect(<RBITS>,<WBITS>,<NBITS>,<TIMEOUT>)
XPerforms a select(2) system call with the same parameters.
Xreadlink(<EXPR>\*)*
XReturns the value of a symbolic link.
Xrename(<OLDNAME>,<NEWNAME>)
XChanges the name of a file.
Xrmdir(<FILENAME>\*)*
XDeletes the directory if it is empty. Sets |$!| on failure.
Xstat(<FILE>)
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 refer
Xto the last file test operation. The parentheses may be omitted if
X<FILE> is a filehandle, a variable, or |_|.
Xsymlink(<OLDFILE>,<NEWFILE>)
XCreates a new filename symbolically linked to the old filename.
Xunlink(<LIST>)*
XDeletes a list of files.
Xutime(<LIST>)*
XChanges the access and modification times on each file of a list of
Xfiles. The first two elements of the list must be the numerical
Xaccess and modification times.
X\endtable
X\beginsection 14. Directory reading routines
X\table1.2in
Xclosedir(<DIRHANDLE>)*
XCloses a directory opened by opendir.
Xopendir(<DIRHANDLE>,<DIRNAME>)
XOpens a directory on the handle specified.
Xreaddir(<DIRHANDLE>)*
XReturns the next entry (or an array of entries) in the directory.
Xrewinddir(<DIRHANDLE>)*
XPositions the directory to the beginning.
Xseekdir(<DIRHANDLE>,<POS>)
XSets position for readdir on the directory.
Xtelldir(<DIRHANDLE>)*
XReturns the postion in the directory.
X\endtable
X\beginsection 15. Input/Output
X\text
XIn input/output operations, <FILEHANDLE> may be a filehandle as
Xopened by the ``open'' operator, or a scalar variable which evaluates to
Xthe name of a filehandle to be used.
X\medskip
X\table1.2in
X%%rjc%% MS-DOS properly capitalized
Xbinmode(<FILEHANDLE>)*
XArranges for the file opened on <FILEHANDLE> to be read in
X``binary'' mode as opposed to ``text'' mode (MS-DOS only).
Xclose(<FILEHANDLE>)*
XCloses the file or pipe associated with the file handle.
Xdbmclose(|%|<ARRAY>)*
XBreaks the binding between the array and the dbm file.
Xdbmopen(|%|<ARRAY>,<DBMNAME>, <MODE>)
XBinds a dbm or ndbm file to the associative array. If the database
Xdoes not exist, it is created with the indicated mode.
Xeof(<FILEHANDLE>)
XReturns 1 if the next read will return end of file, or if the file is not
Xopen.
XReturns the eof status for the last file read.
Xeof()
XIndicates eof on the pseudo file formed of the files listed on the
Xcommand line.
Xfcntl(<FILEHANDLE>,<FUNCTION>,|$|<VAR>)
XImplements the fcntl(2) function. This function has non-standard
Xreturn values. See the manual for details.
Xfileno(<FILEHANDLE>)*
XReturns the file descriptor for a given (open) file.
Xflock(<FILEHANDLE>,<OPERATION>)
XCalls flock(2) on the file. <OPERATION> adds from 1 (shared), 2
X(exclusive), 4 (non-blocking) or 8 (unlock).
Xgetc[(<FILEHANDLE>)*]
XYields the next character from the file, or |NULL| on |EOF|. If
X<FILEHANDLE> is omitted, reads from |STDIN|.
Xioctl(<FILEHANDLE>,<FUNCTION>,|$|<VAR>)
Xperforms ioctl(2) on the file. This function has non-standard return
Xvalues. See the manual for details.
Xopen(<FILEHANDLE>[,<FILENAME>])
XOpens a file and associates it with <FILEHANDLE>. If <FILENAME>
Xis omitted, the scalar variable of the same name as the
X<FILEHANDLE> must contain the filename. The filename may be
Xoptionally preceded by ``|>|'', ``|>>|'' or ``|<|'' to select
Xoutput/append/input mode. Default mode is input. Precede with
X``|+|'' to select read/write access. Use ``|&|\dots'' to connect
Xto an already
Xopened filehandle. Pipes to/from commands may be opened with
X``\|\dots'' and ``\dots\|'' . Open returns 1 upon success, undef otherwise,
Xexcept for pipes. The parentheses may be omitted, if only a
X<FILEHANDLE> is specified.
Xpipe(<READHANDLE>,<WRITEHANDLE>)
XReturns a pair of connected pipes.
Xprint[([<FILEHANDLE>] <LIST>\*)*]
XPrints a string or a comma-separated list of strings. If
X<FILEHANDLE> is omitted, prints by default to standard output (or
SHAR_EOF
echo "End of perlref.tex part 1"
echo "File perlref.tex is continued in part 2"
echo "2" > shar3_seq_.tmp
exit 0
Johan Vromans jv@mh.nl via internet backbones
Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------