#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$m=b$_=sprintf'%-3s 'x@F,@F;s/ +$//?s/(.{57})...+/$1../:last;@0=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@0A*",map b,@F
|
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf'%-3s 'x@F,@F;s/ +$//?$m=b:last;s/(.{57})...+/$1../;@0=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@0A*",map b,@F
|
See comment on my 174.28 solution.
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||exit;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +\b/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf'%-3s 'x@F,@F;s/ +$//||last;$m=b;s/(.{57})...+/$1../;@0=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@0A*",map b,@F
|
This program passes the test script, but breaks when the first letter of a word is a punctuation mark. Assuming that such words are within the rules, this one should probably be consigned to the sand trap.
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.y/A-z0-9//}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||exit;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +\b/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf'%-3s 'x@F,@F;s/ +$//||last;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
Just a trivial change to improve my tie break score.
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||last;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
Although the rules emphasise that underscore is not a letter, they also do not allow underscore to occur in the input, so using \w to count alphanumerics is OK.
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.s/\w/$&/g}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||exit;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.y/A-z0-9//}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||exit;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/\S+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
#!perl -lpa056
sub b{lc=~y/aeiouy//.'/'.y/A-z0-9//}$_=sprintf('%-3s 'x$#F,@F).$F[-1]||exit;$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/[^ ]+ +(?!\.)/g;$_=@F.": $_.
$m: ".pack"@t A*",map b,@F
|
Note the use of A-z instead of A-Za-z. This works because the characters between Z and a never occur in the input, according to the rules.
#!perl -ln00
sub b{lc=~y/aeiouy//.'/'.y/A-z0-9//}map{split;$_=sprintf('%-3s 'x$#_,@_).$_[-1];$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/[^ ]+ +(?!\.)/g;print@_.": $_.
$m: ".pack"@t A*",map b,@_}/\s*([^.]+)./g
|
#!perl -ln00
sub b{lc=~y/aeiouy//.'/'.y/a-zA-Z0-9//}map{split;$_=sprintf('%-3s 'x$#_,@_).$_[-1];$m=b;s/(.{57})...+/$1../;@t=map{A.y///c}/[^ ]+ +(?!\.)/g;print@_.": $_.
$m: ".pack"@t A*",map b,@_}/\s*([^.]+)./g
|
#!perl -lX00
sub b{lc=~y/aeiouy//.'/'.y/a-zA-Z0-9//}map{@r=/\S+/g;$_=sprintf('%-3s 'x$#r,@r).$r[-1];$m=b;s/(.{57})...+/$1../;@t=map{A.length}/[^ ]+ +(?!\.)/g;print@r.": $_.
$m: ".pack"@t A*",map b,@r}map/\s*([^.]+)./g,<>
|
#!perl -lX00
sub b{lc=~y/aeiouy//.'/'.y/a-zA-Z0-9//}map{$n=@r=/\S+/g;$_=sprintf('%-3s 'x$#r,@r).$r[-1];$m=b;s/(.{57})...+/$1../;$s=@s=/ [^.]/g;@x=map$s-->=0&&b.$"x(y///c-length b),@r;print"$n: $_.
$m: @x"=~/.*\d/gs}map/\s*([^.]+)./g,<>
|
#!perl -lX00
sub b{lc=~y/aeiouy//.'/'.y/a-zA-Z0-9//}map{$n=@r=/\S+/g;$_=sprintf('%-3s 'x$#r,@r).$r[-1];$m=b;s/(.{57})...+/$1../;$s=s/ [^.]/$&/g;print"$n: $_.";@x=map$s-->=0&&b.$"x(y///c-length b),@r;print"$m: @x"=~/.*\d/g}map/\s*([^.]+)./g,<>
|