in reply to Number too big to fit in integer

The maximum possible value for $hi is set by the way that perl stores integers. The actual value depends on your system. (Ref to hv).

The maximum possible value of $range is limited by your random number generator (Ref NERDVANA).

You should validate both.

Bill