Probably to see if he could do it himself? Or maybe just felt like doing it rather than looking for a module :) I wrote something very similar except that you told it the number of dice you wanted to roll and how many sides to use. Nothing fancy, just a variation on an exercise I'd done for a Perl class.