in reply to Re: While issues
in thread While issues

Off by one. That will never return $total. rand returns a value that's "up to but not including" its argument.