I think you misunderstood what I was thinking. This routine requires a single string instead of a list of single-character scalars and weighs in at just 103 strokes!
sub bowl {
$_=pop;
s#(\d)([\d/](?=(.)))|X(?=(..))|.#$3?"X$3":$4?"X$4":$1.$2#ge;
s#\d/#/#g;
map{(y./X.aa.)x hex}split//
}
Or, you can handle getting the pinfall data any way you want. I don't care, so long as the code calculates scores correctly.
...so I don't consider this cheating. (: You can replace theh first statement with
$_=join'',@_; if you disagree and I'm still only at 109. This is a fairly long thread so I'm almost certain I missed something, but I didn't see any scores that low.
Update: I can golf that down a bit if you don't mind me using more undef strings which would generate warnings if such were enabled (the original only does that for the bonus balls). Also, I golfed the tr down by one stroke:
sub bowl {
$_=pop;
s#(\d)(\d|/(?=(.)))|X(?=(..))|.#$3.$4?"X$3$4":$1.$2#ge;
s#\d/#/#g;
map{(y./X.a.)x hex}split//
}
which gets me to
98!
Oh, and I did cheat in that you have to call this in a scalar context or you get what looks like a binary number. I'll take a 2-stroke penalty ("0+") for that if required.
Update: Darn, I just noticed that a late bug fix (for /X\d\d/ in the tenth frame) got left out but that fix breaks things worse. An alternate bug fix hurts a little more:
sub bowl {
$_=pop;
s#(\d)(\d(?=.)|/(?=(.)))|X(?=(..))|.#$3.$4?"X$3$4":$1.$2#ge;
s#\d/#/#g;
map{(y./X.a.)x hex}split//
}
which puts me back up at
103.
-
tye
(but my friends call me "Tye")