Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re (tilly) 5: (Golf) Let's go bowling

by tilly (Archbishop)
on Aug 09, 2001 at 02:53 UTC ( #103270=note: print w/replies, xml ) Need Help??


in reply to Re: Re (tilly) 3: (Golf) Let's go bowling
in thread (Golf) Let's go bowling

Grrr. All of the way up to 175:
sub score { $i=$s=0;map{$b=!(++$i<5&&$_[4]eq X||4>$i&&$_[3]eq'/');$s+=$b*$_[$i-2], +$_=/X/?($s+=$b*$_[$i-3],10):10-$_[$i]if/\D/;$s+=$_ if$b}@_=(0,0,rever +se@_);$s }
Note that this does not pass the final test in your suite, but the score given in the final test cannot come from a real bowling game. Remove the trailing 0 that I am sensitive to and I pass.

Ah well. Yet another cute idea killed by horrible boundary conditions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://103270]
help
Chatterbox?
[erix]: yeah... trepidation
Corion quivers with antici...
[choroba]: if you turn off autocommit and run a prepared statement which fails, the transaction is automatically rolled back, at least in DBD::Pg
[erix]: at least, I'll know where to find the documentation :P
[choroba]: but if there's no prepared statement, there's no rollback
[choroba]: the rollback happens when deallocating the prepared statement in error state.
[choroba]: is this something that Pg enforces, or just a consequence of the Perl implementation?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2017-09-19 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (220 votes). Check out past polls.

    Notices?