in reply to Help with Mac Address to Integer conversion

The << operator overflows if it would go above 32 bits on a 32 bit machine, and the result is undefined. So unless you know that you won't overflow (and for dealing with 48 bit MACs this means you need to be on a 64 bit machine with a 64 bit perl) then you need to replace all your $i << $j with $i *= 2 ** $j.

I consider this to be a bug in perl. The other mathemagical operators DTRT when you would overflow an int and auto-promote your data from an int to a double. This should do the same. Yes, there's a corresponding loss of precision, but if we accept that for multiplication we should accept it for shifting.