Just to add some more examples, here are 5.8 (which looks like what I would expect) thru 5.14. All are Strawberries except ActiveState 5.8.9. So it looks, as mentioned above, like something got b0rked in 5.10 and fixed in 5.14 (correct again).
c:\@Work\Perl>perl -wMstrict -le
"print $];
my $s = 'alter string-N-U-M-B-E-R-O-N-E and string-N-U-M-B-E-R-T-W-O.
+';
$s =~ s/(?=\S+([[:upper:]]-){2,}[[:upper:]]\b)/%/g;
print qq{'$s'};
"
5.008009
'alter %s%t%r%i%n%g%-%N%-%U%-%M%-%B%-%E%-%R%-O-N-E and %s%t%r%i%n%g%-%
+N%-%U%-%M%-%B%-%E%-%R%-T-W-O.'
5.010001
'alter %string-N-U-M-B-E-R-O-N-E and %string-N-U-M-B-E-R-T-W-O.'
5.012003
'alter %string-N-U-M-B-E-R-O-N-E and %string-N-U-M-B-E-R-T-W-O.'
5.014004
'alter %s%t%r%i%n%g%-%N%-%U%-%M%-%B%-%E%-%R%-O-N-E and %s%t%r%i%n%g%-%
+N%-%U%-%M%-%B%-%E%-%R%-T-W-O.'
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|