As explained in the CB, the memory address wasn't corrupted, the reference was. It was replaced with a string, and modifications were made to that string. This surely occurred because of a missing dereference.

Looking at the code you provided, I see

$logic = ($cA & $cB & $cC & $cD);

$logic is assigned a string or a number (depending on the values of $cA, $cB, $cC and $cD), but then you do

$logic->as_string

Needless to say, the random string or number you created is not an object, and the call fails.

Judging by the value that does end up in $logic, you've got a second problem. $cA, $cB, $cC or $cD contains a object reference, but you're treating it as a bit string. This is what's corrupting the reference.


In reply to Re: Corrupted Object memory addresses by ikegami
in thread Corrupted Object memory addresses by alexkalderimis

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.