# solution 1 use Config; if ($Config{'use64bitint'}) { # max_integer is probably 2**63-1 } else { # max_integer is probably 2**31-1 }