I have been tasked to convert some C# code to Perl. I think I need pack and unpack and I am having some trouble understanding them well enough. I have read the tutorial and have worked though some of the examples, but still I am unable to get the right results.
The are where I have not been able to get right is with the byte casting of the result of the ^ operand. When I print out $mRc ^ $byte I get 4294965887 which I need to be 127.
$mPolyTable[(unpack "V", pack "U4", ($mCrc ^ $byte))] ;
mCrc = mPolyTable[(byte)(mCrc ^ iByteArray[x])];
Any help would be greatly appreciated.