Over the holiday I tried to clean out my perlfaq updates backlog, but I have a couple of stubborn answers I need help with (much like in Help me update stubborn perlfaq answers!).

6.9 What is "/o" really for?

Update ikegami has the answer, but does anyone remember the patch or thread on p5p that made it official?

I've been told, but haven't been able to verify when this change took place, that the latest versions of Perl won't recompile a regular expression using interpolation if the variable hasn't changed. I don't see any notes in the perldelta about it. Any information there? If I can't say something like "Since perl5.6, ....", then I won't change the answer.

6.6 How can I make "\w" match national character sets?

Note: doc references are for the docs as of Perl 5.8.8

I asked about this one in Help me update stubborn perlfaq answers! and got part of an answer about \p{} in Re: Help me update stubborn perlfaq answers!. I don't have experience with that sorta stuff, so maybe someone can give me some good examples along with the text to explain them.

Also, Alan Flavell pointed out to me that although the answer says to see perllocale, that says in Unicode and UTF-8:

Usually locale settings and Unicode do not affect each other, but there are exceptions, see "Locales" in perlunicode for examples.
Where, over in perlunicode it says in the BUGS section:
Use of locales with Unicode data may lead to odd results. Currently, Perl attempts to attach 8-bit locale info to characters in the range 0..255, but this technique is demonstrably incorrect for locales that use characters above that range when mapped into Unicode. Perl's Unicode support will also tend to run slower. Use of locales with Unicode is discouraged.

Not only that, but in Security Implications of Unicode in the same document, it says:

...unlike most locales, which are specific to a language and country pair, Unicode classifies all the characters that are letters somewhere as \w.

Dr. Ruud sent me a nice little program to find out just how many things show up in \w, and it's a lot more than just a national character set.

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review

In reply to Year end FAQ stubborn answer help, 2006 edition by brian_d_foy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.