Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

colomon (8994)

  (email not shown publicly)

Journal of colomon (8994)

Wednesday December 24, 2008
10:28 AM

Second Script Game: Skating Scores

[ #38156 ]
This one is simple: take a list of skating scores, drop the highest and lowest, and take the average of the remaining to get the actual score. Perl 6 shines here, with split and the reduction meta operator making for elegant code. But I've hit on a weird snag:

$score = $score - (@scores.min () + @scores.max ());

doesn't compile. Err... but

$score = $score - (@scores.min() + @scores.max());

does. Is space before function parameters no longer allowed?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.