diff options
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlcall.pod | 4 | ||||
-rw-r--r-- | pod/perldata.pod | 2 | ||||
-rw-r--r-- | pod/perldelta.pod | 37 | ||||
-rw-r--r-- | pod/perldiag.pod | 16 | ||||
-rw-r--r-- | pod/perlembed.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq.pod | 19 | ||||
-rw-r--r-- | pod/perlfaq1.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq2.pod | 31 | ||||
-rw-r--r-- | pod/perlfaq3.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq4.pod | 9 | ||||
-rw-r--r-- | pod/perlfaq5.pod | 2 | ||||
-rw-r--r-- | pod/perlfaq6.pod | 24 | ||||
-rw-r--r-- | pod/perlfaq7.pod | 4 | ||||
-rw-r--r-- | pod/perlfaq8.pod | 17 | ||||
-rw-r--r-- | pod/perlfaq9.pod | 19 | ||||
-rw-r--r-- | pod/perlguts.pod | 6 | ||||
-rw-r--r-- | pod/perlmod.pod | 2 | ||||
-rw-r--r-- | pod/perlop.pod | 6 | ||||
-rw-r--r-- | pod/perlpod.pod | 10 | ||||
-rw-r--r-- | pod/perlsub.pod | 14 | ||||
-rw-r--r-- | pod/perltoc.pod | 108 | ||||
-rw-r--r-- | pod/pod2html.PL | 2 |
22 files changed, 235 insertions, 103 deletions
diff --git a/pod/perlcall.pod b/pod/perlcall.pod index 1ff71fc581..8236102f80 100644 --- a/pod/perlcall.pod +++ b/pod/perlcall.pod @@ -388,8 +388,8 @@ When C<Call_fred> is executed it will print As control never returns to C<Call_fred>, the C<"back in Call_fred"> string will not get printed. -To work around this problem, you can either upgrade to Perl 5.002 (or -later), or use the G_EVAL flag with I<perl_call_*> as shown below +To work around this problem, you can either upgrade to Perl 5.002 or +higher, or use the G_EVAL flag with I<perl_call_*> as shown below void Call_fred() diff --git a/pod/perldata.pod b/pod/perldata.pod index f0837b3854..b69e77e3d7 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -342,7 +342,7 @@ quoted, the type of quotes you use determines the treatment of the text, just as in regular quoting. An unquoted identifier works like double quotes. There must be no space between the C<E<lt>E<lt>> and the identifier. (If you put a space it will be treated as a null -identifier, which is valid, and matches the first blank line.) The +identifier, which is valid, and matches the first empty line.) The terminating string must appear by itself (unquoted and with no surrounding whitespace) on the terminating line. diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 958bee38ed..46bd59b04f 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -27,17 +27,29 @@ might have symbol conflicts if you embed Perl in another application, just as in the 5.003 release. By default, binary compatibility is preserved at the expense of symbol table pollution. -=head2 No Autovivification of Subroutine Parameters +=head2 Subroutine arguments created only when they're modified -In Perl versions 5.002 and 5.003, array and hash elements used as -subroutine parameters were "autovivified"; that is, they were brought -into existence if they did not already exist. For example, calling -C<func($h{foo})> would create C<$h{foo}> if it did not already exist, -causing C<exists $h{foo}> to become true and C<keys %h> to return -C<('foo')>. +In Perl 5.004, nonexistent array and hash elements used as subroutine +parameters are brought into existence only if they are actually +assigned to (via C<@_>). -Perl 5.004 returns to the pre-5.002 behavior of I<not> autovivifying -array and hash elements used as subroutine parameters. +Earlier versions of Perl vary in their handling of such arguments. +Perl versions 5.002 and 5.003 always brought them into existence. +Perl versions 5.000, 5.001, and 5.002 brought them into existence only +if they were not the first argument (which was almost certainly a +bug). Earlier versions of Perl never brought them into existence. + +For example, given this code: + + undef @a; undef %a; + sub show { print $_[0] }; + sub change { $_[0]++ }; + show($a[2]); + change($a{b}); + +After this code executes in Perl 5.004, $a{b} exists but $a[2] does +not. In Perl 5.002 and 5.003, both $a{b} and $a[2] would have existed +(but $a[2]'s value would have been undefined). =head2 Fixed Parsing of $$<digit>, &$<digit>, etc. @@ -267,6 +279,13 @@ string in some way. This change makes it practical to chain C<m//g> matches together in conjunction with ordinary matches using the C<\G> zero-width assertion. See L<perlop> and L<perlre>. +=item C<m//x> ignores whitespace before ?*+{} + +The C<m//x> construct has always been intended to ignore all unescaped +whitespace. However, before Perl 5.004, whitespace had the effect of +esacping repeat modifier like "*" or "?". For example, C</a *b/x> was +(mis)interpreted as C</a\*b/x>. This bug has been fixed in 5.004. + =item nested C<sub{}> closures work now Prior to the 5.004 release, nested anonymous functions didn't work diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e0a23b0162..90b811f691 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -334,6 +334,12 @@ wasn't a symbol table entry. of Perl. Check the #! line, or manually feed your script into Perl yourself. +=item Bareword "%s" not allowed while "strict subs" in use + +(F) With "strict subs" in use, a bareword is only allowed as a +subroutine identifier, in curly braces or to the left of the "=>" symbol. +Perhaps you need to pre-declare a subroutine? + =item BEGIN failed--compilation aborted (F) An untrapped exception was raised while executing a BEGIN subroutine. @@ -475,7 +481,7 @@ They must have ordinary identifiers as names. =item Can't do in-place edit without backup (F) You're on a system such as MSDOS that gets confused if you try reading -from a deleted (but still opened) file. You have to say B<-i>C<.bak>, or some +from a deleted (but still opened) file. You have to say C<-i.bak>, or some such. =item Can't do inplace edit: %s E<gt> 14 characters @@ -1869,10 +1875,10 @@ last argument of the previous construct, for example: open FOO || die; -=item Prototype mismatch: (%s) vs (%s) +=item Prototype mismatch: %s vs %s -(S) The subroutine being defined had a pre-declared (forward) declaration -with a different function prototype. +(S) The subroutine being declared or defined had previously been declared +or defined with a different function prototype. =item Read on closed filehandle E<lt>%sE<gt> @@ -2461,7 +2467,7 @@ bad side effects. =item Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated (D) You are now encouraged to use the explicitly quoted form if you -wish to use a blank line as the terminator of the here-document. +wish to use an empty line as the terminator of the here-document. =item Use of implicit split to @_ is deprecated diff --git a/pod/perlembed.pod b/pod/perlembed.pod index 4b88754f72..7752156026 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -753,7 +753,7 @@ with L<perlfunc/my> whenever possible. exit(exitstatus); } - + Now compile: % cc -o persistent persistent.c `perl -MExtUtils::Embed -e ccopts -e ldopts` diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod index 8db316c24b..8cbb343e7b 100644 --- a/pod/perlfaq.pod +++ b/pod/perlfaq.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq - frequently asked questions about Perl ($Date: 1997/03/17 22:17:56 $) +perlfaq - frequently asked questions about Perl ($Date: 1997/03/25 18:20:48 $) =head1 DESCRIPTION @@ -124,6 +124,23 @@ in respect of this information or its use. =over 4 +=item 25/March/97 + +Added more info to the binary distribution section of L<perlfaq2>. +Added Net::Telnet to L<perlfaq6>. Fixed typos in L<perlfaq8>. Added +mail sending example to L<perlfaq9>. Added Merlyn's columns to +L<perlfaq2>. + +=item 18/March/97 + +Added the DATE to the NAME section, indicating which sections have +changed. + +Mentioned SIGPIPE and L<perlipc> in the forking open answer in +L<perlfaq8>. + +Fixed description of a regular expression in L<perlfaq4>. + =item 17/March/97 Version Various typos fixed throughout. diff --git a/pod/perlfaq1.pod b/pod/perlfaq1.pod index 2510a4b1f1..ad7c68a124 100644 --- a/pod/perlfaq1.pod +++ b/pod/perlfaq1.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq1 - General Questions About Perl ($Revision: 1.10 $) +perlfaq1 - General Questions About Perl ($Revision: 1.11 $, $Date: 1997/03/19 17:23:09 $) =head1 DESCRIPTION diff --git a/pod/perlfaq2.pod b/pod/perlfaq2.pod index b4c3e9f1dc..7fa34d9c27 100644 --- a/pod/perlfaq2.pod +++ b/pod/perlfaq2.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.13 $) +perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.15 $, $Date: 1997/03/25 18:15:48 $) =head1 DESCRIPTION @@ -39,6 +39,21 @@ grab a binary version of gcc from the net and use that to compile perl with. CPAN only has binaries for systems that are terribly hard to get free compilers for, not for Unix systems. +Your first stop should be http://www.perl.com/CPAN/ports to see what +information is already available. A simple installation guide for +MS-DOS is available at http://www.cs.ruu.nl/~piet/perl5dos.html , and +similarly for Windows 3.1 at http://www.cs.ruu.nl/~piet/perlwin3.html +. + +=head2 I don't have a C compiler on my system. How can I compile perl? + +Since you don't have a C compiler, you're doomed and your vendor +should be sacrificed to the Sun gods. But that doesn't help you. + +What you need to do is get a binary version of gcc for your system +first. Consult the Usenet FAQs for your operating system for +information on where to get such a binary version. + =head2 I copied the Perl binary from one machine to another, but scripts don't work. That's probably because you forgot libraries, or library paths differ. @@ -55,6 +70,9 @@ If this command lists any paths which don't exist on your system, then you may need to move the appropriate libraries to these locations, or create symlinks, aliases, or shortcuts appropriately. +You might also want to check out L<perlfaq8/"How do I keep my own +module/library directory?">. + =head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work? Read the F<INSTALL> file, which is part of the source distribution. @@ -222,15 +240,18 @@ It is published (on paper, not online) quarterly by Jon Orwant (orwant@tpj.com), editor. Subscription information is at http://tpj.com or via email to subscriptions@tpj.com. -Beyond this, two other magazines that frequently carry high-quality articles -on Perl are Web Techniques (see http://www.webtechniques.com/) and -Unix Review (http://www.unixreview.com/). +Beyond this, two other magazines that frequently carry high-quality +articles on Perl are Web Techniques (see +http://www.webtechniques.com/) and Unix Review +(http://www.unixreview.com/). Randal Schwartz's Web Technique's +columns are available on the web at +http://www.stonehenge.com/merlyn/WebTechniques/ . =head2 Perl on the Net: FTP and WWW Access To get the best (and possibly cheapest) performance, pick a site from the list below and use it to grab the complete list of mirror sites. ->From there you can find the quickest site for you. Remember, the +From there you can find the quickest site for you. Remember, the following list is I<not> the complete list of CPAN mirrors. http://www.perl.com/CPAN (redirects to another mirror) diff --git a/pod/perlfaq3.pod b/pod/perlfaq3.pod index 121743ddbf..64dec98234 100644 --- a/pod/perlfaq3.pod +++ b/pod/perlfaq3.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq3 - Programming Tools ($Revision: 1.19 $) +perlfaq3 - Programming Tools ($Revision: 1.20 $, $Date: 1997/03/19 17:23:43 $) =head1 DESCRIPTION diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 1c1edfa467..34b7e5b0f3 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq4 - Data Manipulation ($Revision: 1.15 $) +perlfaq4 - Data Manipulation ($Revision: 1.17 $, $Date: 1997/03/25 18:16:24 $) =head1 DESCRIPTION @@ -254,7 +254,7 @@ Although those with a regexp kind of thought process will likely prefer You have to keep track. For example, let's say you want to change the fifth occurrence of "whoever" or "whomever" -into "whosoever", case insensitively. +into "whosoever" or "whomsoever", case insensitively. $count = 0; s{((whom?)ever)}{ @@ -286,12 +286,15 @@ integers: =head2 How do I capitalize all the words on one line? To make the first letter of each word upper case: + $line =~ s/\b(\w)/\U$1/g; To make the whole line upper case: + $line = uc($line); To force each word to be lower case, with the first letter upper case: + $line =~ s/(\w+)/\u\L$1/g; =head2 How can I split a [character] delimited string except when inside @@ -770,7 +773,7 @@ find one of the associated keys. This may or may not worry you. If you mean how many keys, then all you have to do is take the scalar sense of the keys() function: - $num_keys = scalar keys %hash; + $num_keys = scalar keys %hash; In void context it just resets the iterator, which is faster for tied hashes. diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod index c36576ff7f..9c5e842793 100644 --- a/pod/perlfaq5.pod +++ b/pod/perlfaq5.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq5 - Files and Formats ($Revision: 1.19 $) +perlfaq5 - Files and Formats ($Revision: 1.20 $, $Date: 1997/03/19 17:24:51 $) =head1 DESCRIPTION diff --git a/pod/perlfaq6.pod b/pod/perlfaq6.pod index 589d89e495..0adebd72fe 100644 --- a/pod/perlfaq6.pod +++ b/pod/perlfaq6.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq6 - Regexps ($Revision: 1.14 $) +perlfaq6 - Regexps ($Revision: 1.16 $, $Date: 1997/03/25 18:16:56 $) =head1 DESCRIPTION @@ -143,6 +143,26 @@ Actually, you could do this if you don't mind reading the whole file into undef $/; @records = split /your_pattern/, <FH>; +The Net::Telnet module (available from CPAN) has the capability to +wait for a pattern in the input stream, or timeout if it doesn't +appear within a certain time. + + ## Create a file with three lines. + open FH, ">file"; + print FH "The first line\nThe second line\nThe third line\n"; + close FH; + + ## Get a read/write filehandle to it. + $fh = new FileHandle "+<file"; + + ## Attach it to a "stream" object. + use Net::Telnet; + $file = new Net::Telnet (-fhopen => $fh); + + ## Search for the second line and print out the third. + $file->waitfor('/second line\n/'); + print $file->getline; + =head2 How do I substitute case insensitively on the LHS, but preserving case on the RHS? It depends on what you mean by "preserving case". The following @@ -542,7 +562,7 @@ This is a big problem. Here are a few ways, all painful, to deal with it: - $martian =~ s/([A-Z][A-Z])/ $1 /g; # Make sure adjacent ``maritan'' bytes + $martian =~ s/([A-Z][A-Z])/ $1 /g; # Make sure adjacent ``martian'' bytes # are no longer adjacent. print "found GX!\n" if $martian =~ /GX/; diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index 14bfc678fc..54380e62a4 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq7 - Perl Language Issues ($Revision: 1.15 $) +perlfaq7 - Perl Language Issues ($Revision: 1.16 $, $Date: 1997/03/19 17:25:23 $) =head1 DESCRIPTION @@ -169,7 +169,7 @@ own module. Make sure to change the names appropriately. # if using RCS/CVS, this next line may be preferred, # but beware two-digit versions. - $VERSION = do{my@r=q$Revision: 1.15 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; + $VERSION = do{my@r=q$Revision: 1.16 $=~/\d+/g;sprintf '%d.'.'%02d'x$#r,@r}; @ISA = qw(Exporter); @EXPORT = qw(&func1 &func2 &func3); diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod index 6ad5c15750..7250afbca5 100644 --- a/pod/perlfaq8.pod +++ b/pod/perlfaq8.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq8 - System Interaction ($Revision: 1.15 $) +perlfaq8 - System Interaction ($Revision: 1.17 $, $Date: 1997/03/25 18:17:12 $) =head1 DESCRIPTION @@ -379,6 +379,17 @@ easy-to-use approach that internally uses pipe(), fork(), and exec() to do the job. Make sure you read the deadlock warnings in its documentation, though (see L<IPC::Open2>). +=head2 Why can't I get the output of a command with system()? + +You're confusing the purpose of system() and backticks (''). system() +runs a command and returns exit status information (as a 16 bit value +-- the low 8 bits are the signal the process died from, if any, and +the high 8 bits are the actual exit value). Backticks ('') run a +command and return what it sent to STDOUT. + + $status = system("mail-users"); + $output = `ls`; + =head2 How can I capture STDERR from an external command? There are three basic ways of running external commands: @@ -437,7 +448,9 @@ process ID of the child. The child exec()s the command to be piped to/from. The parent can't know whether the exec() was successful or not - all it can return is whether the fork() succeeded or not. To find out if the command succeeded, you have to catch SIGCHLD and -wait() to get the exit status. +wait() to get the exit status. You should also catch SIGPIPE if +you're writing to the child -- you may not have found out the exec() +failed by the time you write. This is documented in L<perlipc>. On systems that follow the spawn() paradigm, open() I<might> do what you expect - unless perl uses a shell to start your command. In this diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index e62dac4bd3..2c9a3e063b 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq9 - Networking ($Revision: 1.13 $) +perlfaq9 - Networking ($Revision: 1.15 $, $Date: 1997/03/25 18:17:20 $) =head1 DESCRIPTION @@ -229,6 +229,23 @@ not UNIX-centric. Reading mail: use the Mail::Folder module from CPAN (part of the MailFolder package) or the Mail::Internet module from CPAN (also part of the MailTools package). + # sending mail + use Mail::Internet; + use Mail::Header; + # say which mail host to use + $ENV{SMTPHOSTS} = 'mail.frii.com'; + # create headers + $header = new Mail::Header; + $header->add('From', 'gnat@frii.com'); + $header->add('Subject', 'Testing'); + $header->add('To', 'gnat@frii.com'); + # create body + $body = 'This is a test, ignore'; + # create mail object + $mail = new Mail::Internet(undef, Header => $header, Body => \[$body]); + # send it + $mail->smtpsend or die; + =head2 How do I find out my hostname/domainname/IP address? A lot of code has historically cavalierly called the C<`hostname`> diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 866cafb2fc..ff3d6cdc5d 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -162,7 +162,7 @@ bus error, or just weird results. Change the zero to C<&sv_undef> in the first line and all will be well. To free an SV that you've created, call C<SvREFCNT_dec(SV*)>. Normally this -call is not necessary (see the section on L<Reference Counts and Mortality>). +call is not necessary (see L<Reference Counts and Mortality>). =head2 What's Really Stored in an SV? @@ -422,7 +422,7 @@ A reference can be blessed into a package with the following function: SV* sv_bless(SV* sv, HV* stash); The C<sv> argument must be a reference. The C<stash> argument specifies -which class the reference will belong to. See the section on +which class the reference will belong to. See L<Stashes and Globs> for information on converting class names into stashes. /* Still under construction */ @@ -1587,7 +1587,7 @@ C<hv_iterinit>. char* hv_iterkey _((HE* entry, I32* retlen)); =item hv_iterkeysv - + Returns the key as an C<SV*> from the current position of the hash iterator. The return value will always be a mortal copy of the key. Also see C<hv_iterinit>. diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 2f1ae5b20e..194cd1125d 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -1428,6 +1428,6 @@ the application could invoked as: perl -e 'use Module::Name; method(@ARGV)' ... or - perl -mModule::Name ... (in perl5.002) + perl -mModule::Name ... (in perl5.002 or higher) =back diff --git a/pod/perlop.pod b/pod/perlop.pod index c4a342be7b..a0756678d1 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -741,10 +741,10 @@ combine several regexps like this to process a string part-by-part, doing different actions depending on which regexp matched. The next regexp would step in at the place the previous one left off. - $_ = <<'EOL'; + $_ = <<'EOL'; $url = new URI::URL "http://www/"; die if $url eq "xXx"; -EOL - LOOP: + EOL + LOOP: { print(" digits"), redo LOOP if /\G\d+\b[,.;]?\s*/g; print(" lowercase"), redo LOOP if /\G[a-z]+\b[,.;]?\s*/g; diff --git a/pod/perlpod.pod b/pod/perlpod.pod index ce092214b8..6a13991437 100644 --- a/pod/perlpod.pod +++ b/pod/perlpod.pod @@ -95,7 +95,7 @@ treat some of these as synonyms.) And don't forget, when using any command, that the command lasts up until the end of the B<paragraph>, not the line. Hence in the examples below, you -can see the blank lines after each command to end its paragraph. +can see the empty lines after each command to end its paragraph. Some examples of lists include: @@ -188,7 +188,7 @@ documentation with a "=head1" command at the beginning, and end it with a "=cut" command. Perl will ignore the pod text. See any of the supplied library modules for examples. If you're going to put your pods at the end of the file, and you're using an __END__ or __DATA__ -cut mark, make sure to put a blank line there before the first pod +cut mark, make sure to put an empty line there before the first pod directive. __END__ @@ -198,7 +198,7 @@ directive. modern - I am a modern module -If you had not had that blank line there, then the translators wouldn't +If you had not had that empty line there, then the translators wouldn't have seen it. =head1 Common Pod Pitfalls @@ -208,7 +208,7 @@ have seen it. =item * Pod translators usually will require paragraphs to be separated by -completely empty lines. If you have an apparently blank line with +completely empty lines. If you have an apparently empty line with some spaces on it, this can cause odd formatting. =item * @@ -222,7 +222,7 @@ sensibly. =item * The script F<pod/checkpods.PL> in the Perl source distribution -provides skeletal checking for lines that look blank but aren't +provides skeletal checking for lines that look empty but aren't B<only>, but is there as a placeholder until someone writes Pod::Checker. The best way to check your pod is to pass it through one or more translators and proofread the result, or print out the diff --git a/pod/perlsub.pod b/pod/perlsub.pod index f2a5b8ff0f..6e2309dfb2 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -47,9 +47,17 @@ there's really no difference from the language's perspective.) Any arguments passed to the routine come in as the array @_. Thus if you called a function with two arguments, those would be stored in C<$_[0]> -and C<$_[1]>. The array @_ is a local array, but its values are implicit -references (predating L<perlref>) to the actual scalar parameters. The -return value of the subroutine is the value of the last expression +and C<$_[1]>. The array @_ is a local array, but its elements are +aliases for the actual scalar parameters. In particular, if an element +C<$_[0]> is updated, the corresponding argument is updated (or an error +occurs if it is not updatable). If an argument is an array or hash +element which did not exist when the function was called, that element is +created only when (and if) it is modified or if a reference to it is +taken. (Some earlier versions of Perl created the element whether or not +it was assigned to.) Note that assigning to the whole array @_ removes +the aliasing, and does not update any arguments. + +The return value of the subroutine is the value of the last expression evaluated. Alternatively, a return statement may be used to specify the returned value and exit the subroutine. If you return one or more arrays and/or hashes, these will be flattened together into one large diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 4e412bd7b8..baef9320aa 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -38,8 +38,8 @@ expression enhancements, Innumerable Unbundled Modules, Compilability =item NOTES -=head2 perlfaq - frequently asked questions about Perl ($Date: 1997/03/17 -22:17:56 $) +=head2 perlfaq - frequently asked questions about Perl ($Date: 1997/03/25 +18:20:48 $) =item DESCRIPTION @@ -76,9 +76,10 @@ authors =item Changes -17/March/97 Version, Initial Release: 11/March/97 +25/March/97, 18/March/97, 17/March/97 Version, Initial Release: 11/March/97 -=head2 perlfaq1 - General Questions About Perl ($Revision: 1.10 $) +=head2 perlfaq1 - General Questions About Perl ($Revision: 1.11 $, $Date: +1997/03/19 17:23:09 $) =item DESCRIPTION @@ -118,7 +119,8 @@ Scheme, or Tcl? =item AUTHOR AND COPYRIGHT -=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.13 $) +=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.15 $, +$Date: 1997/03/25 18:15:48 $) =item DESCRIPTION @@ -128,6 +130,8 @@ Scheme, or Tcl? =item How can I get a binary version of Perl? +=item I don't have a C compiler on my system. How can I compile perl? + =item I copied the Perl binary from one machine to another, but scripts don't work. @@ -171,7 +175,8 @@ MacPerl, Perl5-Porters, NTPerl, Perl-Packrats =item AUTHOR AND COPYRIGHT -=head2 perlfaq3 - Programming Tools ($Revision: 1.19 $) +=head2 perlfaq3 - Programming Tools ($Revision: 1.20 $, $Date: 1997/03/19 +17:23:43 $) =item DESCRIPTION @@ -245,7 +250,8 @@ mean? =item AUTHOR AND COPYRIGHT -=head2 perlfaq4 - Data Manipulation ($Revision: 1.15 $) +=head2 perlfaq4 - Data Manipulation ($Revision: 1.17 $, $Date: 1997/03/25 +18:16:24 $) =item DESCRIPTION @@ -435,7 +441,8 @@ or array of hashes or arrays? =item AUTHOR AND COPYRIGHT -=head2 perlfaq5 - Files and Formats ($Revision: 1.19 $) +=head2 perlfaq5 - Files and Formats ($Revision: 1.20 $, $Date: 1997/03/19 +17:24:51 $) =item DESCRIPTION @@ -518,7 +525,7 @@ protected files? Isn't this a bug in Perl? =item AUTHOR AND COPYRIGHT -=head2 perlfaq6 - Regexps ($Revision: 1.14 $) +=head2 perlfaq6 - Regexps ($Revision: 1.16 $, $Date: 1997/03/25 18:16:56 $) =item DESCRIPTION @@ -579,7 +586,8 @@ file? =item AUTHOR AND COPYRIGHT -=head2 perlfaq7 - Perl Language Issues ($Revision: 1.15 $) +=head2 perlfaq7 - Perl Language Issues ($Revision: 1.16 $, $Date: +1997/03/19 17:25:23 $) =item DESCRIPTION @@ -645,7 +653,8 @@ is in scope? =item AUTHOR AND COPYRIGHT -=head2 perlfaq8 - System Interaction ($Revision: 1.15 $) +=head2 perlfaq8 - System Interaction ($Revision: 1.17 $, $Date: 1997/03/25 +18:17:12 $) =item DESCRIPTION @@ -694,6 +703,8 @@ does the error message "Protocol not supported" mean? =item How can I open a pipe both to and from a command? +=item Why can't I get the output of a command with system()? + =item How can I capture STDERR from an external command? =item Why doesn't open() return an error when a pipe open fails? @@ -749,7 +760,8 @@ complete? =item AUTHOR AND COPYRIGHT -=head2 perlfaq9 - Networking ($Revision: 1.13 $) +=head2 perlfaq9 - Networking ($Revision: 1.15 $, $Date: 1997/03/25 18:17:20 +$) =item DESCRIPTION @@ -813,7 +825,7 @@ file on another machine? =item Compilation Option: Binary Compatibility With 5.003 -=item No Autovivification of Subroutine Parameters +=item Subroutine arguments created only when they're modified =item Fixed Parsing of $$<digit>, &$<digit>, etc. @@ -838,8 +850,8 @@ $^E, $^H, $^M delete on slices, flock, printf and sprintf, keys as an lvalue, my() in Control Structures, unpack() and pack(), use VERSION, use Module VERSION LIST, prototype(FUNCTION), srand, $_ as Default, C<m//g> does not trigger a -pos() reset on failure, nested C<sub{}> closures work now, formats work -right on changing lexicals +pos() reset on failure, C<m//x> ignores whitespace before ?*+{}, nested +C<sub{}> closures work now, formats work right on changing lexicals =item New Built-in Methods @@ -2296,38 +2308,34 @@ G_NOARGS, G_SCALAR, gv_fetchmeth, gv_fetchmethod, gv_stashpv, gv_stashsv, GvSV, HEf_SVKEY, HeHASH, HeKEY, HeKLEN, HePV, HeSVKEY, HeSVKEY_force, HeSVKEY_set, HeVAL, hv_clear, hv_delayfree_ent, hv_delete, hv_delete_ent, hv_exists, hv_exists_ent, hv_fetch, hv_fetch_ent, hv_free_ent, hv_iterinit, -hv_iterkey, hv_iterkeysv -Returns the key as an C<SV*> from the current position of the hash -iterator. The return value will always be a mortal copy of the -key. Also see C<hv_iterinit>, hv_iternext, hv_iternextsv, hv_iterval, -hv_magic, HvNAME, hv_store, hv_store_ent, hv_undef, isALNUM, isALPHA, -isDIGIT, isLOWER, isSPACE, isUPPER, items, ix, LEAVE, MARK, mg_clear, -mg_copy, mg_find, mg_free, mg_get, mg_len, mg_magical, mg_set, Move, na, -New, Newc, Newz, newAV, newHV, newRV_inc, newRV_noinc, newSV, newSViv, -newSVnv, newSVpv, newSVrv, newSVsv, newXS, newXSproto, Nullav, Nullch, -Nullcv, Nullhv, Nullsv, ORIGMARK, perl_alloc, perl_call_argv, -perl_call_method, perl_call_pv, perl_call_sv, perl_construct, -perl_destruct, perl_eval_sv, perl_free, perl_get_av, perl_get_cv, -perl_get_hv, perl_get_sv, perl_parse, perl_require_pv, perl_run, POPi, -POPl, POPp, POPn, POPs, PUSHMARK, PUSHi, PUSHn, PUSHp, PUSHs, PUTBACK, -Renew, Renewc, RETVAL, safefree, safemalloc, saferealloc, savepv, savepvn, -SAVETMPS, SP, SPAGAIN, ST, strEQ, strGE, strGT, strLE, strLT, strNE, -strnEQ, strnNE, sv_2mortal, sv_bless, sv_catpv, sv_catpvn, sv_catsv, -sv_cmp, sv_cmp, SvCUR, SvCUR_set, sv_dec, sv_dec, SvEND, sv_eq, SvGROW, -sv_grow, sv_inc, SvIOK, SvIOK_off, SvIOK_on, SvIOK_only, SvIOK_only, -SvIOKp, sv_isa, SvIV, sv_isobject, SvIVX, SvLEN, sv_len, sv_len, sv_magic, -sv_mortalcopy, SvOK, sv_newmortal, sv_no, SvNIOK, SvNIOK_off, SvNIOKp, -SvNOK, SvNOK_off, SvNOK_on, SvNOK_only, SvNOK_only, SvNOKp, SvNV, SvNVX, -SvPOK, SvPOK_off, SvPOK_on, SvPOK_only, SvPOK_only, SvPOKp, SvPV, SvPVX, -SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK, SvROK_off, SvROK_on, SvRV, -sv_setiv, sv_setnv, sv_setpv, sv_setpvn, sv_setref_iv, sv_setref_nv, -sv_setref_pv, sv_setref_pvn, sv_setsv, SvSTASH, SVt_IV, SVt_PV, SVt_PVAV, -SVt_PVCV, SVt_PVHV, SVt_PVMG, SVt_NV, SvTRUE, SvTYPE, svtype, SvUPGRADE, -sv_upgrade, sv_undef, sv_unref, sv_usepvn, sv_yes, THIS, toLOWER, toUPPER, -warn, XPUSHi, XPUSHn, XPUSHp, XPUSHs, XS, XSRETURN, XSRETURN_EMPTY, -XSRETURN_IV, XSRETURN_NO, XSRETURN_NV, XSRETURN_PV, XSRETURN_UNDEF, -XSRETURN_YES, XST_mIV, XST_mNV, XST_mNO, XST_mPV, XST_mUNDEF, XST_mYES, -XS_VERSION, XS_VERSION_BOOTCHECK, Zero +hv_iterkey, hv_iterkeysv, hv_iternext, hv_iternextsv, hv_iterval, hv_magic, +HvNAME, hv_store, hv_store_ent, hv_undef, isALNUM, isALPHA, isDIGIT, +isLOWER, isSPACE, isUPPER, items, ix, LEAVE, MARK, mg_clear, mg_copy, +mg_find, mg_free, mg_get, mg_len, mg_magical, mg_set, Move, na, New, Newc, +Newz, newAV, newHV, newRV_inc, newRV_noinc, newSV, newSViv, newSVnv, +newSVpv, newSVrv, newSVsv, newXS, newXSproto, Nullav, Nullch, Nullcv, +Nullhv, Nullsv, ORIGMARK, perl_alloc, perl_call_argv, perl_call_method, +perl_call_pv, perl_call_sv, perl_construct, perl_destruct, perl_eval_sv, +perl_free, perl_get_av, perl_get_cv, perl_get_hv, perl_get_sv, perl_parse, +perl_require_pv, perl_run, POPi, POPl, POPp, POPn, POPs, PUSHMARK, PUSHi, +PUSHn, PUSHp, PUSHs, PUTBACK, Renew, Renewc, RETVAL, safefree, safemalloc, +saferealloc, savepv, savepvn, SAVETMPS, SP, SPAGAIN, ST, strEQ, strGE, +strGT, strLE, strLT, strNE, strnEQ, strnNE, sv_2mortal, sv_bless, sv_catpv, +sv_catpvn, sv_catsv, sv_cmp, sv_cmp, SvCUR, SvCUR_set, sv_dec, sv_dec, +SvEND, sv_eq, SvGROW, sv_grow, sv_inc, SvIOK, SvIOK_off, SvIOK_on, +SvIOK_only, SvIOK_only, SvIOKp, sv_isa, SvIV, sv_isobject, SvIVX, SvLEN, +sv_len, sv_len, sv_magic, sv_mortalcopy, SvOK, sv_newmortal, sv_no, SvNIOK, +SvNIOK_off, SvNIOKp, SvNOK, SvNOK_off, SvNOK_on, SvNOK_only, SvNOK_only, +SvNOKp, SvNV, SvNVX, SvPOK, SvPOK_off, SvPOK_on, SvPOK_only, SvPOK_only, +SvPOKp, SvPV, SvPVX, SvREFCNT, SvREFCNT_dec, SvREFCNT_inc, SvROK, +SvROK_off, SvROK_on, SvRV, sv_setiv, sv_setnv, sv_setpv, sv_setpvn, +sv_setref_iv, sv_setref_nv, sv_setref_pv, sv_setref_pvn, sv_setsv, SvSTASH, +SVt_IV, SVt_PV, SVt_PVAV, SVt_PVCV, SVt_PVHV, SVt_PVMG, SVt_NV, SvTRUE, +SvTYPE, svtype, SvUPGRADE, sv_upgrade, sv_undef, sv_unref, sv_usepvn, +sv_yes, THIS, toLOWER, toUPPER, warn, XPUSHi, XPUSHn, XPUSHp, XPUSHs, XS, +XSRETURN, XSRETURN_EMPTY, XSRETURN_IV, XSRETURN_NO, XSRETURN_NV, +XSRETURN_PV, XSRETURN_UNDEF, XSRETURN_YES, XST_mIV, XST_mNV, XST_mNO, +XST_mPV, XST_mUNDEF, XST_mYES, XS_VERSION, XS_VERSION_BOOTCHECK, Zero =item EDITOR @@ -4207,8 +4215,7 @@ setlogmask $mask_priority, closelog =item DESCRIPTION -E<lt>tabE<gt>Attempts word completion. -Cannot be changed, ^D, ^U, E<lt>delE<gt>, E<lt>bsE<gt> +E<lt>tabE<gt>, ^D, ^U, E<lt>delE<gt>, E<lt>bsE<gt> =item DIAGNOSTICS @@ -4401,7 +4408,8 @@ function =item DESCRIPTION -isa ( TYPE ), can ( METHOD ), VERSION ( [ REQUIRE ] ), isa ( REF, TYPE ) +isa ( TYPE ), can ( METHOD ), VERSION ( [ REQUIRE ] ), isa ( VAL, TYPE ), +can ( VAL, METHOD ) =head2 User::grent - by-name interface to Perl's built-in getgr*() functions diff --git a/pod/pod2html.PL b/pod/pod2html.PL index 8dafea5d09..1c53f6c090 100644 --- a/pod/pod2html.PL +++ b/pod/pod2html.PL @@ -526,7 +526,7 @@ sub find_refs { for ($$thing) { #s:L<([a-zA-Z][^\s\/]+)(\([^\)]+\))>:the I<$1>$2 manpage:g; s@(\S+?://\S*[^.,;!?\s])@noremap(qq{<A HREF="$1">$1</A>})@ge; - s,([a-z0-9_.-]+\@([a-z0-9_-]+\.)+([a-z0-9_-]+)),noremap(qq{<A HREF="MAILTO:$1">$1</A>}),gie; + s,([a-z0-9_.-]+\@([a-z0-9_-]+\.)+([a-z0-9_-]+)),noremap(qq{<A HREF="mailto:$1">$1</A>}),gie; s/L<([^>]*)>/lrefs($1,$htype)/ge; s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge; s/(S)<([^\/]\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge; |