I repeated the same download procedure that I used originally and got different data.

$ for i in md5 sha1; do openssl dgst -$i CSelTest.pm CSelTest.pm-20160 +902a_ORIGINAL_CODE; done MD5(CSelTest.pm)= 2a721b1bdc7e0ba01a9620c2cf61b171 MD5(CSelTest.pm-20160902a_ORIGINAL_CODE)= 2fc9805a057076e10117e0fc710f +6321 SHA1(CSelTest.pm)= 092f86a1c1c03523c2bb9f459ef353a757dfa8b6 SHA1(CSelTest.pm-20160902a_ORIGINAL_CODE)= 49bc50c3b30e817be950a9bcda9 +973baa5b85309

The new code was four bytes shorter ...

$ ls -l CSelTest.pm CSelTest.pm-20160902a_ORIGINAL_CODE -rw-r--r-- 1 ken staff 3224 3 Sep 00:16 CSelTest.pm -rw-r--r-- 1 ken staff 3228 2 Sep 19:14 CSelTest.pm-20160902a_ORIG +INAL_CODE

... due to replacing "et ai", wherever that came from, with presumably the missing closing parenthesis:

$ diff CSelTest.pm CSelTest.pm-20160902a_ORIGINAL_CODE 43c43 < )? --- > et ai?

Anyway, I ran your six tests and got the same results except for the second one: correctly output '"="', instead of '"eq"'.

$ perl -MCSelTest -MData::Dump -E 'dd CSelTest::parse_csel(q{ [attr=1] + })' [[{ name => "attr" }], "=", 1]

Update: Added " [Part 1 of 2]" to the title to differentiate this node, "Re^3: Weirdness (duplicated data) while building result during parsing using regex", from another of the same name, "Re^3: Weirdness (duplicated data) while building result during parsing using regex" (which will have " [Part 2 of 2]" appended).

— Ken


In reply to Re^3: Weirdness (duplicated data) while building result during parsing using regex [Part 1 of 2] by kcott
in thread Weirdness (duplicated data) while building result during parsing using regex by perlancar

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.