in reply to How do I convert a 32 bit unsigned integer to its decimal value?
$int = unpack 'N', $str; [download]
You could also use unpack 'V' but based on your code 'N' is what you need.