Unless you use parallel threads which mysteriously change the value of $buffer, I don't think that Perl gets "out of sync" when writing your memory. You did not specify at which point $buffer is not equal to $array[0]. Of course there are some parts in your program where these variables are potentially not equal (for example, during the execution of mytestfunc).
BTW, are you sure that we are talking about numerical unequality, and not string unequality? I.e., $buffer contains always a number, right? Because you are using != and not ne.
In reply to Re: volatile memory?
by rovf
in thread volatile memory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |