The Monthly Course: Interlinear Counts


Goal

For each sentence in an input stream, display the count of words, of vowels, and of alphanumeric character. Also display the count of vowels and of alphanumerics for each of as many words as will fit on a line.


Specification

The program is a filter: it must read from STDIN, and send output to STDOUT.


Tiebreaker

The tiebreaker is calculated as the number of vowels in the script divided by the total number of letters and digits.


General rules


Example

Given the input:

 I am just a poor sample paragraph. Please don't treat me too
 hard as you split and separate me into vowels and stuff.

You are to output the following:

 7:      I   am  just a   poor sample paragraph.
 11/27:  1/1 1/2 1/4  1/1 2/4  2/6    3/9
 16:     Please don't treat me  too hard as  you split and separat...
 27/65:  3/6    1/4   2/5   1/2 2/3 1/4  1/2 3/3 1/5   1/3 4/8


Deadline

The game starts June 1st (00:00 UTC) and ends June 8th (00:00 UTC).


Test program

A test program is provided to help screen entries (for those of you who feel courageous, there's also the Games::Golf version - be warned: it's still an experimental module, use at your own risks).

There's a new version (v1.04) of the test program!!

Any program that passes the test program should be submitted. If you are surprised that your solution passed the test program, please submit it anyway! That will help us identify bugs in the test program.

For the test program to work correctly, you will have to name your script interlin.pl and place it in the same directory as your test program. Run the test program:

    $ perl tpr04.pl

to verify that your entries are valid.

Passing the test program does not assure your solution is valid. The referees have the final say.


Submitting

You can submit your solutions here (you'll notice it's the same page as the Leaderboard).

Do not publish your solutions anywhere. That will spoil the game, as your solutions are meant to be secret. All solutions will be published at the end of the game.

Prizes (provided by O'Reilly and ActiveState) will be awarded to veteran and beginner winners. A prize may also be awarded to any especially interesting artistic and/or unorthodox solutions.


Leaderboard

You can track your ranking through the leaderboard here. Beginners are encouraged to enter and there is a separate leaderboard for them.

There is also a special leaderboard for teams. There will be no prizes awarded to the best team, other than the admiration of your fellow golfers. If you are in a team, you can't also play individually.


Feedback

We encourage you to send feedback as well as your ideas for future holes and tiebreakers to golf@theperlreview.com.


Referees

If you want to be a referee next month, drop us a note: golf@theperlreview.com