summaryrefslogtreecommitdiff
path: root/cpan/perlfaq
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2019-01-28 14:31:57 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2019-01-28 14:31:57 +0000
commit257870a65c4f7004a643994cbd0c6bce11db9f8b (patch)
tree3fdb5ea0eb29b628155599ab5e98f97a19655012 /cpan/perlfaq
parent6bf77a4bea241aa338f9a8d7ba6aaf25db91e34b (diff)
downloadperl-257870a65c4f7004a643994cbd0c6bce11db9f8b.tar.gz
Update perlfaq to CPAN version 5.20190126
[DELTA] 5.20190126 2019-01-26 04:39:37Z * Many typos and pod markup fixed (PR#75, #76) thanks, Joaquin Ferrero!) * Added reference in perlfaq to new ~ syntax in indented here-docs (PR#77, thanks Celejar!)
Diffstat (limited to 'cpan/perlfaq')
-rw-r--r--cpan/perlfaq/lib/perlfaq.pm2
-rw-r--r--cpan/perlfaq/lib/perlfaq.pod2
-rw-r--r--cpan/perlfaq/lib/perlfaq1.pod2
-rw-r--r--cpan/perlfaq/lib/perlfaq2.pod2
-rw-r--r--cpan/perlfaq/lib/perlfaq3.pod2
-rw-r--r--cpan/perlfaq/lib/perlfaq4.pod6
-rw-r--r--cpan/perlfaq/lib/perlfaq5.pod6
-rw-r--r--cpan/perlfaq/lib/perlfaq6.pod34
-rw-r--r--cpan/perlfaq/lib/perlfaq7.pod2
-rw-r--r--cpan/perlfaq/lib/perlfaq8.pod4
-rw-r--r--cpan/perlfaq/lib/perlfaq9.pod2
-rw-r--r--cpan/perlfaq/lib/perlglossary.pod2
12 files changed, 35 insertions, 31 deletions
diff --git a/cpan/perlfaq/lib/perlfaq.pm b/cpan/perlfaq/lib/perlfaq.pm
index f0db2da8ac..b3645bc3cb 100644
--- a/cpan/perlfaq/lib/perlfaq.pm
+++ b/cpan/perlfaq/lib/perlfaq.pm
@@ -2,6 +2,6 @@ use strict;
use warnings;
package perlfaq;
-our $VERSION = '5.20180915';
+our $VERSION = '5.20190126';
1;
diff --git a/cpan/perlfaq/lib/perlfaq.pod b/cpan/perlfaq/lib/perlfaq.pod
index 19177f9a9e..3dd9f6c3c9 100644
--- a/cpan/perlfaq/lib/perlfaq.pod
+++ b/cpan/perlfaq/lib/perlfaq.pod
@@ -4,7 +4,7 @@ perlfaq - Frequently asked questions about Perl
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlfaq1.pod b/cpan/perlfaq/lib/perlfaq1.pod
index b9d04297da..4c023f8eb4 100644
--- a/cpan/perlfaq/lib/perlfaq1.pod
+++ b/cpan/perlfaq/lib/perlfaq1.pod
@@ -4,7 +4,7 @@ perlfaq1 - General Questions About Perl
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlfaq2.pod b/cpan/perlfaq/lib/perlfaq2.pod
index 3b168ea211..c039bdfd13 100644
--- a/cpan/perlfaq/lib/perlfaq2.pod
+++ b/cpan/perlfaq/lib/perlfaq2.pod
@@ -4,7 +4,7 @@ perlfaq2 - Obtaining and Learning about Perl
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlfaq3.pod b/cpan/perlfaq/lib/perlfaq3.pod
index c18448211e..df99fd8d87 100644
--- a/cpan/perlfaq/lib/perlfaq3.pod
+++ b/cpan/perlfaq/lib/perlfaq3.pod
@@ -4,7 +4,7 @@ perlfaq3 - Programming Tools
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlfaq4.pod b/cpan/perlfaq/lib/perlfaq4.pod
index 8afd54e368..55f9f6fd13 100644
--- a/cpan/perlfaq/lib/perlfaq4.pod
+++ b/cpan/perlfaq/lib/perlfaq4.pod
@@ -4,7 +4,7 @@ perlfaq4 - Data Manipulation
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
@@ -1244,6 +1244,10 @@ indentation correctly preserved:
--Bilbo in /usr/src/perl/pp_ctl.c
EVER_ON_AND_ON
+Beginning with Perl version 5.26, a much simpler and cleaner way to
+write indented here documents has been added to the language: the
+tilde (~) modifier. See L<perlop/"Indented Here-docs"> for details.
+
=head1 Data: Arrays
=head2 What is the difference between a list and an array?
diff --git a/cpan/perlfaq/lib/perlfaq5.pod b/cpan/perlfaq/lib/perlfaq5.pod
index 58441bf275..aa7764b969 100644
--- a/cpan/perlfaq/lib/perlfaq5.pod
+++ b/cpan/perlfaq/lib/perlfaq5.pod
@@ -4,7 +4,7 @@ perlfaq5 - Files and Formats
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
@@ -801,7 +801,7 @@ To open file for writing, create new file, file must not exist:
To open file for appending, create if necessary:
- open my $fh, '>>' $path or die $!;
+ open my $fh, '>>', $path or die $!;
sysopen my $fh, $path, O_WRONLY|O_APPEND|O_CREAT or die $!;
sysopen my $fh, $path, O_WRONLY|O_APPEND|O_CREAT, 0666 or die $!;
@@ -1543,7 +1543,7 @@ a similar interface, but does the traversal for you too:
(contributed by brian d foy)
If you have an empty directory, you can use Perl's built-in C<rmdir>.
-If the directory is not empty (so, no files or subdirectories), you
+If the directory is not empty (so, with files or subdirectories), you
either have to empty it yourself (a lot of work) or use a module to
help you.
diff --git a/cpan/perlfaq/lib/perlfaq6.pod b/cpan/perlfaq/lib/perlfaq6.pod
index adb1e2de80..eeaad01e2b 100644
--- a/cpan/perlfaq/lib/perlfaq6.pod
+++ b/cpan/perlfaq/lib/perlfaq6.pod
@@ -4,7 +4,7 @@ perlfaq6 - Regular Expressions
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
@@ -118,7 +118,7 @@ be mangled by many mailers):
$/ = ''; # read in whole paragraph, not just one line
while ( <> ) {
while ( /^From /gm ) { # /m makes ^ match next to \n
- print "leading from in paragraph $.\n";
+ print "leading From in paragraph $.\n";
}
}
@@ -352,7 +352,7 @@ To escape the special meaning of C<.>, we use C<\Q>:
$string =~ s/\Q$regex/Polyp/;
# $string is now "Placido Polyp Octopus"
-The use of C<\Q> causes the <.> in the regex to be treated as a
+The use of C<\Q> causes the C<.> in the regex to be treated as a
regular character, so that C<P.> matches a C<P> followed by a dot.
=head2 What is C</o> really for?
@@ -776,26 +776,26 @@ boundary before the "P" and after the "l". As long as something other
than a word character precedes the "P" and succeeds the "l", the
pattern will match. These strings match /\bPerl\b/.
- "Perl" # no word char before P or after l
+ "Perl" # no word char before "P" or after "l"
"Perl " # same as previous (space is not a word char)
- "'Perl'" # the ' char is not a word char
- "Perl's" # no word char before P, non-word char after "l"
+ "'Perl'" # the "'" char is not a word char
+ "Perl's" # no word char before "P", non-word char after "l"
These strings do not match /\bPerl\b/.
- "Perl_" # _ is a word char!
- "Perler" # no word char before P, but one after l
+ "Perl_" # "_" is a word char!
+ "Perler" # no word char before "P", but one after "l"
You don't have to use \b to match words though. You can look for
non-word characters surrounded by word characters. These strings
match the pattern /\b'\b/.
- "don't" # the ' char is surrounded by "n" and "t"
- "qep'a'" # the ' char is surrounded by "p" and "a"
+ "don't" # the "'" char is surrounded by "n" and "t"
+ "qep'a'" # the "'" char is surrounded by "p" and "a"
These strings do not match /\b'\b/.
- "foo'" # there is no word char after non-word '
+ "foo'" # there is no word char after non-word "'"
You can also use the complement of \b, \B, to specify that there
should not be a word boundary.
@@ -846,7 +846,7 @@ string where the last match left off. The regular
expression engine cannot skip over any characters to find
the next match with this anchor, so C<\G> is similar to the
beginning of string anchor, C<^>. The C<\G> anchor is typically
-used with the C<g> flag. It uses the value of C<pos()>
+used with the C<g> modifier. It uses the value of C<pos()>
as the position to start the next match. As the match
operator makes successive matches, it updates C<pos()> with the
position of the next character past the last match (or the
@@ -856,7 +856,7 @@ to look at it). Each string has its own C<pos()> value.
Suppose you want to match all of consecutive pairs of digits
in a string like "1122a44" and stop matching when you
encounter non-digits. You want to match C<11> and C<22> but
-the letter <a> shows up between C<22> and C<44> and you want
+the letter C<a> shows up between C<22> and C<44> and you want
to stop at C<a>. Simply matching pairs of digits skips over
the C<a> and still matches C<44>.
@@ -873,7 +873,7 @@ found.
my @pairs = m/\G(\d\d)/g; # qw( 11 22 )
You can also use the C<\G> anchor in scalar context. You
-still need the C<g> flag.
+still need the C<g> modifier.
$_ = "1122a44";
while( m/\G(\d\d)/g ) {
@@ -890,7 +890,7 @@ and the next match on the same string starts at the beginning.
print "Found $1 after while" if m/(\d\d)/g; # finds "11"
-You can disable C<pos()> resets on fail with the C<c> flag, documented
+You can disable C<pos()> resets on fail with the C<c> modifier, documented
in L<perlop> and L<perlreref>. Subsequent matches start where the last
successful match ended (the value of C<pos()>) even if a match on the
same string has failed in the meantime. In this case, the match after
@@ -905,7 +905,7 @@ C<44>.
print "Found $1 after while" if m/(\d\d)/g; # finds "44"
-Typically you use the C<\G> anchor with the C<c> flag
+Typically you use the C<\G> anchor with the C<c> modifier
when you want to try a different match if one fails,
such as in a tokenizer. Jeffrey Friedl offers this example
which works in 5.004 or later.
@@ -924,7 +924,7 @@ For each line, the C<PARSER> loop first tries to match a series
of digits followed by a word boundary. This match has to
start at the place the last match left off (or the beginning
of the string on the first match). Since C<m/ \G( \d+\b
-)/gcx> uses the C<c> flag, if the string does not match that
+)/gcx> uses the C<c> modifier, if the string does not match that
regular expression, perl does not reset pos() and the next
match starts at the same position to try a different
pattern.
diff --git a/cpan/perlfaq/lib/perlfaq7.pod b/cpan/perlfaq/lib/perlfaq7.pod
index 967c0733bb..c2014646cc 100644
--- a/cpan/perlfaq/lib/perlfaq7.pod
+++ b/cpan/perlfaq/lib/perlfaq7.pod
@@ -4,7 +4,7 @@ perlfaq7 - General Perl Language Issues
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlfaq8.pod b/cpan/perlfaq/lib/perlfaq8.pod
index 424350a2b3..d9418ed503 100644
--- a/cpan/perlfaq/lib/perlfaq8.pod
+++ b/cpan/perlfaq/lib/perlfaq8.pod
@@ -4,7 +4,7 @@ perlfaq8 - System Interaction
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
@@ -255,7 +255,7 @@ illustrative:
(This question has nothing to do with the web. See a different
FAQ for that.)
-There's an example of this in L<perlfunc/crypt>). First, you put the
+There's an example of this in L<perlfunc/crypt>. First, you put the
terminal into "no echo" mode, then just read the password normally.
You may do this with an old-style C<ioctl()> function, POSIX terminal
control (see L<POSIX> or its documentation the Camel Book), or a call
diff --git a/cpan/perlfaq/lib/perlfaq9.pod b/cpan/perlfaq/lib/perlfaq9.pod
index 563178a626..4a6799c589 100644
--- a/cpan/perlfaq/lib/perlfaq9.pod
+++ b/cpan/perlfaq/lib/perlfaq9.pod
@@ -4,7 +4,7 @@ perlfaq9 - Web, Email and Networking
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION
diff --git a/cpan/perlfaq/lib/perlglossary.pod b/cpan/perlfaq/lib/perlglossary.pod
index 7f202f12b1..3fef83de0d 100644
--- a/cpan/perlfaq/lib/perlglossary.pod
+++ b/cpan/perlfaq/lib/perlglossary.pod
@@ -7,7 +7,7 @@ perlglossary - Perl Glossary
=head1 VERSION
-version 5.20180915
+version 5.20190126
=head1 DESCRIPTION