My Brethren and Sistren(?),
I need help with a number generator. I want "1" returned 80% of the time, "2" 10% of the time, and "3" 10% of the time. By "of the time" I mean, say, 1 out of 10 times a program is run, "print $a" will return "2", etc. Is there a more elegant way to do this than the following?