Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!rutgers!mit-eddie!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.lang.perl Subject: REPOST: texinfo version of perl refguide (3 of 3) Message-ID: Date: 27 Jun 90 16:32:07 GMT Sender: news@mhres.mh.nl Reply-To: Johan Vromans Organization: Multihouse Automation, the Netherlands Lines: 372 X-Checksum-Snefru: a4da66c3 ccb53891 3b1e8e9e a5474388 Archive-name: perlref.texinfo/part03 ---- Cut Here and unpack ---- #!/bin/sh # this is xxx.03 (part 3 of perlref.texinfo) # do not concatenate these parts, unpack them in order with /bin/sh # file perlref.texinfo continued # if touch 2>&1 | fgrep '[-amc]' > /dev/null then TOUCH=touch else TOUCH=true fi if test ! -r shar3_seq_.tmp; then echo "Please unpack part 1 first!" exit 1 fi (read Scheck if test "$Scheck" != 3; then echo "Please unpack part $Scheck next!" exit 1 else exit 0 fi ) < shar3_seq_.tmp || exit 1 echo "x - Continuing file perlref.texinfo" sed 's/^X//' << 'SHAR_EOF' >> perlref.texinfo && X X@item @code{+} Xmatches the preceding pattern element one or more times. X X@item @code{?} Xmatches zero or one times. X X@c %%rjc%% syntax elaborated X@item @code{@{@var{n} [, [@var{m}]]@}} Xdenote the minimum (@var{n}) and maximum (@var{m}) match count. If X@code{,} is omitted, uses @var{m=n}. If @var{m} is omitted but @code{,} Xis present, uses @var{m=infinity}.@refill X X@item @code{\w} Xmatches alphanumeric, including @code{_}, @code{\W} matches Xnon-alphanumeric.@refill X X@item @code{\b} Xmatches word boundaries, @code{\B} matches non-boundaries. X X@item @code{\s} Xmatches whitespace, @code{\S} matches non-whitespace. X X@item @code{\d} Xmatches numeric, @code{\D} matches non-numeric. X@end table X X@code{\n}, @code{\r}, @code{\f}, @code{\t} and @code{\}@var{NNN} have Xtheir usual meaning.@refill X X@code{\w}, @code{\s} and @code{\d} may be used within character classes, X@code{\b} denotes backspace in this context.@refill X X@code{\1} @dots{}\ @code{\9} refer to matched sub-expressions inside the Xmatch.@refill X X@code{$1} @dots{}\ @code{$9} can be used to refer to matched Xsub-expressions outside the matching.@refill X X@table @asis X X@item @code{$+} Xreturns whatever the last bracket match matched. X X@item @code{$&} Xreturns the entire matched string. X X@item @code{$`} Xreturns everything before the matched string. X X@item @code{$'} Xreturns everything after the matched string. X@end table X X@c---------------------------------------------------------------- X@node Formats, Special variables, Regular expressions, Top X@chapter Formats X X@example Xformat [@var{NAME}] = X@var{FORMLIST} X. X@end example X X@var{FORMLIST} pictures the lines, and contains the arguments which will Xgive values to the fields in the lines. Picture fields are:@refill X X@table @code X X@item @@<<<@dots{} Xleft adjusted field, the @code{<} is repeated to denote the Xlength of the field; X X@item @@>>>@dots{} Xright adjusted field; X X@item @@|||@dots{} Xcentered field; X X@item @@* Xa multi-line field. X@end table X XUse @code{^} instead of @code{@@} for multi-line block filling. X XUse @code{~} at the beginning of a line to suppress unwanted empty lines. X XUse @code{~~} at the beginning of a line to have this format line Xrepeated until all fields are exhausted.@refill X XSet @code{$-} to zero to force a page break. X X@c---------------------------------------------------------------- X@node Special variables, Special arrays, Formats, Top X@chapter Special variables X XThe following variables are global and should be localized in subroutines: X X@table @asis X X@item @code{$_} XThe default input and pattern-searching space. X X@item @code{$.} XThe current input line number of the last filehandle that was read. X X@item @code{$/} XThe input record separator, newline by default. X X@item @code{$,} XThe output field separator for the print operator. X X@item @code{$"} XThe separator which joins elements of arrays interpolated in X strings. X X@item @code{$\} XThe output record separator for the print operator. X X@item @code{$#} XThe output format for printed numbers. Initial value is @code{%.20g}. X X@item @code{$*} XSet to 1 to do multiline matching within a string, 0 to assume Xstrings contain a single line. Default is 0.@refill X X@item @code{$?} XThe status returned by the last backtick (``) command, Xpipe close or system operator. X X@item @code{$]} XThe perl version string as displayed with @code{perl -v}. X X@item @code{$[} XThe index of the first element in an array, and of the first character Xin a substring. Default is 0.@refill X X@item @code{$;} XThe subscript separator for multi-dimensional array emulation. XDefault is @code{"\034"}. X X@item @code{$!} XIf used in a numeric context, yields the current value of errno. If Xused in a string context, yields the corresponding error string.@refill X X@item @code{$@@} XThe perl error message from the last eval or @code{do @var{EXPR}} command. X X@item @code{$:} XThe set of characters after which a string may be broken to fill Xcontinuation fields (starting with @code{^}) in a format.@refill X X@item @code{$0} XThe name of the file containing the perl script being executed. X X@item @code{$$} XThe process number of the perl running this script. Altered (in the Xchild process) by fork().@refill X X@item @code{$<} XThe real uid of this process. X X@item @code{$>} XThe effective uid of this process. X X@item @code{$(} XThe real gid of this process. X X@item @code{$)} XThe effective gid of this process. X@end table X XThe following variables are context dependent and need not be Xlocalized:@refill X X@table @asis X X@item @code{$%} XThe current page number of the currently selected output channel. X X@item @code{$=} XThe page length of the current output channel. Default is 60 lines. X X@item @code{$-} XThe number of lines left on the page. X X@item @code{$~} XThe name of the current report format. X X@item @code{$^} XThe name of the current top-of-page format. X X@item @code{$|} XIf set to nonzero, forces a flush after every write or print on the Xcurrently selected output channel. Default is 0.@refill X XThe following variables are always local to the current block: X X@item @code{$&} XThe string matched by the last pattern match. X X@item @code{$`} XThe string preceding what was matched by the last pattern match. X X@item @code{$'} XThe string following what was matched by the last pattern match. X X@item @code{$+} XThe last bracket matched by the last search pattern. X X@item @code{$1 @dots{} $9} XContains the subpattern from the corresponding set of parentheses Xin the last pattern matched.@refill X@end table X X X@c---------------------------------------------------------------- X@node Special arrays, The perl debugger, Special variables, Top X@chapter Special arrays X X@table @asis X X@item @code{@@ARGV} XContains the command line arguments for the script (not Xincluding the command name). See @code{$0} for the command name.@refill X X@item @code{@@INC} XContains the list of places to look for perl scripts to be Xevaluated by the @code{do @var{EXPR}} command.@refill X X@item @code{@@_} XParameter array for subroutines. Also used by split if not in Xarray context. X X@item @code{%ENV} XContains the current environment. X X@item @code{%SIG} XUsed to set signal handlers for various signals. X@end table X X X@c---------------------------------------------------------------- X@node The perl debugger, Index, Special arrays, Top X@chapter The perl debugger (invoked with @code{perl -d}) X X@table @asis X X@item @code{h} XPrints out a help message. X X@item @code{s} XSingle steps. X X@item @code{c} XContinues (until breakpoint or exit). X X@item @key{RET} XRepeats last @code{s} or @code{n}. X X@item @code{n} XSingle steps around subroutine call. X X@item @code{l} [@var{RANGE}] Xlists a range of lines. @var{RANGE} may be a number, start - end, Xstart + amount, or a subroutine name. If omitted, continues last X@code{l}.@refill X X@item @code{L} XLists lines that have breakpoints or actions. X X@item @code{t} XToggles trace mode. X X@item @code{b} [@var{LINE}] XSets breakpoint at (current) line. X X@item @code{b} @var{SUBNAME} XSets breakpoint at the subroutine. X X@item @code{S} XLists names of all subroutines. X X@item @code{d} @var{LINE} XDeletes breakpoint at the given line. X X@item @code{D} XDeletes all breakpoints. X X@item @code{A} XDeletes all line actions. X X@item @code{V} [@var{PACKAGE}] XLists all variables in a package. Default package is main. X X@item @code{a} @var{LINE} @var{COMMAND} XSets an action for line. X X@item @code{<} @var{COMMAND} XSets an action to be executed before every debugger prompt. X X@item @code{>} @var{COMMAND} XSets an action to be executed before every @code{s}, @code{c} or @code{n} Xcommand.@refill X X@item @code{!} [ [@code{-}]@var{NUMBER}] XRedo a debugging command. Default is previous command. X X@item @code{H} [@code{-}@var{NUMBER}] XDisplays the last @code{-}number commands of more than one letter. X X@item @code{q} XQuits. You may also use your @key{EOF} character. X X@item @var{COMMAND} XExecutes command as a perl statement. X X@item @code{p} @var{EXPR}* XPrints @var{EXPR}. X@end table X X@node Index, , The perl debugger, Top X@chapter Index X XWe need command and function indices. X X@contents X@bye SHAR_EOF echo "File perlref.texinfo is complete" && $TOUCH -am 0615095490 perlref.texinfo && chmod 0644 perlref.texinfo || echo "restore of perlref.texinfo failed" set `wc -c perlref.texinfo`;Wc_c=$1 if test "$Wc_c" != "43795"; then echo original size 43795, current size $Wc_c fi rm -f shar3_seq_.tmp echo "You have unpacked the last part" 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 62911/62500 ------------------------ "Arms are made for hugging" -------------------------