|Perl: the Markov chain saw|
YAGG (Yet Another Golf Game)by Necos (Friar)
|on Feb 12, 2002 at 04:35 UTC||Need Help??|
Well, since my last golf game was so well received, I decided to add some more functionality to my little coin-flipping code, and count the number of times we flip heads in a row, as well as count the number of heads total.
Without further discussion, here is the code base that I came up with:
Here is some sample output from a coworker's WinXP box (using ActivePerl 522):
My code seems somewhat bloated, and I know it can be golfed some, but I'm not really a regex wiz yet, so this code is about as good as I'm going to get.
Let the games begin!
Theodore Charles III
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224