diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-09-12 18:57:18 +0100 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-09-12 20:38:51 +0100 |
commit | c56bc1f68457eda03dc835055d1da96643166af7 (patch) | |
tree | b5ddf5acfe7bd1d1a07d915deb2703f4dbec6f45 /cpan/perlfaq/lib/perlfaq6.pod | |
parent | 4a02128048ba336d25ccdaf0a0da3e7a7bca1173 (diff) | |
download | perl-c56bc1f68457eda03dc835055d1da96643166af7.tar.gz |
Update perlfaq to CPAN version 5.0150034
[DELTA]
5.0150034 Mon 12 Sep 2011 18:41:25 +0100
* Copy edit Perl 6 a bit more (ranguard)
* Add blog section (ranguard)
* Update much of the copy about emails in perlfaq9 (apeiron)
* Many small changes (bigpresh)
* Add descriptions to doc list (bigpresh)
* Start moving away from global file handles (shlomif)
* Typos, clarity and other cleanups (shlomif)
* Cleanup copy (ranguard)
* Start to add "my" to variables (shlomif)
* Remove verbose/history copy (ranguard)
* Switch to L<> around URLs (ranguard)
Diffstat (limited to 'cpan/perlfaq/lib/perlfaq6.pod')
-rw-r--r-- | cpan/perlfaq/lib/perlfaq6.pod | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpan/perlfaq/lib/perlfaq6.pod b/cpan/perlfaq/lib/perlfaq6.pod index 7327b68d95..e60d1dfd71 100644 --- a/cpan/perlfaq/lib/perlfaq6.pod +++ b/cpan/perlfaq/lib/perlfaq6.pod @@ -6,7 +6,7 @@ perlfaq6 - Regular Expressions This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, -decoding a URL and checking whether something is a number are handled +decoding a URL and checking whether something is a number can be handled with regular expressions, but those answers are found elsewhere in this document (in L<perlfaq9>: "How do I decode or create those %-encodings on the web" and L<perlfaq4>: "How do I determine whether a scalar is @@ -68,6 +68,10 @@ delimiter within the pattern: s/\/usr\/local/\/usr\/share/g; # bad delimiter choice s#/usr/local#/usr/share#g; # better +Using logically paired delimiters can be even more readable: + + s{/usr/local/}{/usr/share}g; # better still + =back =head2 I'm having trouble matching over more than one line. What's wrong? @@ -159,7 +163,7 @@ If you just want to get work done, use a module and forget about the regular expressions. The L<XML::Parser> and L<HTML::Parser> modules are good starts, although each namespace has other parsing modules specialized for certain tasks and different ways of doing it. Start at -CPAN Search ( http://search.cpan.org ) and wonder at all the work people +CPAN Search ( L<http://search.cpan.org> ) and wonder at all the work people have done for you already! :) The problem with things such as XML is that they have balanced text @@ -1049,7 +1053,7 @@ but this usually can be worked around. =head2 How do I match a regular expression that's in a variable? X<regex, in variable> X<eval> X<regex> X<quotemeta> X<\Q, regex> -X<\E, regex>, X<qr//> +X<\E, regex> X<qr//> (contributed by brian d foy) |