I think the issue with the module's original code is that the one side of the match has been decoded from UTF-8 (the word list from the file) while the other is in Latin1 (the literal strings in the source). In your test case, both are in Latin1, so they match.

When adding (at the beginning of the loop)

$word = Encode::decode("iso-8859-1", $word); # force utf8 flag on print "$word:\n";

I can reproduce the problem, i.e. when forcing utf8, I get

constitución:
contribución:
destitución:
devolución:
disminución:
constituciones:
Step 1 case 4: constitu
contribuciones:
Step 1 case 4: contribu
destituciones:
Step 1 case 4: destitu
devoluciones:
Step 1 case 4: devolu
disminuciones:
Step 1 case 4: disminu
foo:

while with your original test, the output is

constitución:
Step 1 case 4: constitu
contribución:
Step 1 case 4: contribu
destitución:
Step 1 case 4: destitu
devolución:
Step 1 case 4: devolu
disminución:
Step 1 case 4: disminu
constituciones:
Step 1 case 4: constitu
contribuciones:
Step 1 case 4: contribu
destituciones:
Step 1 case 4: destitu
devoluciones:
Step 1 case 4: devolu
disminuciones:
Step 1 case 4: disminu
foo:

In reply to Re^2: RegExp breaks in Perl 5.10 by almut
in thread RegExp breaks in Perl 5.10 by jfraire

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.