Need to see all of your code. I am extremely familiar with Perl on the Raspberry Pi, so I may be able to help.
In reply to Re: i2c bus contention by stevieb in thread i2c bus contention by anita2R