in reply to perl rand() function

Yup, rand is zero inclusive.

For rounding, you have several options:

See also: Does perl have a round function? What about ceil() and floor()? Trig functions?

Cheers,
--Moodster