Interlinear
Score: 176.21 (pass)
s/ +(?=$|:)//mg -> s/ +(\n|:)/$1/g
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$"x
y...c|(@z=/[aeiouy]/ig).'/'.s/\w/$&/g}@w=/\S*\w\S*/g,$_;s/(.{57})...+\S/$1.../,$_=@w.": $_
$d[-1]: @d[0..s/ +[^.]//g]
"if$_="@w";s/ +(
|:)/$1/g
|
Score: 177.21 (pass)
.{3,} -> ...+
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$"x
y...c|(@z=/[aeiouy]/ig).'/'.s/\w/$&/g}@w=/\S*\w\S*/g,$_;s/(.{57})...+\S/$1.../,$_=@w.": $_
$d[-1]: @d[0..s/ +[^.]//g]
"if$_="@w";s/ +(?=$|:)//mg
|
Score: 178.20 (pass)
Move a s/// outside the if, saving a space.
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$"x
y...c|(@z=/[aeiouy]/ig).'/'.s/\w/$&/g}@w=/\S*\w\S*/g,$_;s/(.{57}).{3,}\S/$1.../,$_=@w.": $_
$d[-1]: @d[0..s/ +[^.]//g]
"if$_="@w";s/ +(?=$|:)//mg
|
Score: 179.20 (pass)
Replace a @_=// with s//$&/
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$"x
y...c|(@z=/[aeiouy]/ig).'/'.s/\w/$&/g}@w=/\S*\w\S*/g,$_;s/(.{57}).{3,}\S/$1.../,$_=@w.": $_
$d[-1]: @d[0..s/ +[^.]//g]
",s/ +(?=$|:)//mg if$_="@w"
|
Score: 180.20 (pass)
Woohoo, 7 strokes off with some reorganization.
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$"x
y...c|(@z=/[aeiouy]/ig).'/'.(@x=/\w/g)}@w=/\S*\w\S*/g,$_;s/(.{57}).{3,}\S/$1.../,$_=@w.": $_
$d[-1]: @d[0..s/ +[^.]//g]
",s/ +(?=$|:)//mg if$_="@w"
|
Score: 187.18 (pass)
Get rid of a space.
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$v+=@z=/[aeiouy]/ig;$t+=@x=/\w/g;$"x
y...c|@z.'/'.@x}@w=/\S*\w\S*/g;s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$t: @d[0..s/ +[^.]//g]
",s/ +$//mg,$v=$t=0if$_="@w"
|
Score: 188.18 (pass)
Twiddle with the tiebreakers, and -> if
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$v+=@z=/[aeiouy]/ig;$t+=@x=/\w/g;$"x
y...c|@z.'/'.@x}@w=/\S*\w\S*/g;s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$t: @d[0..s/ +[^.]//g]
",s/ +$//mg if$_="@w";$v=$t=t
|
Score: 189.32 (pass)
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=/\S*\w\S*/g;$_="@w"and
s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]//g]
",s/ +$//mg;$v=$a=a
|
Score: 190.33 (pass)
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=/\S*\w\S*/ig;$_="@w"and
s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]//g]
",s/ +$//mg;$v=$a=a
|
Score: 192.33 (pass)
Remove the outer map, thanks to aliasing. I thought map didn't do that?
#!perl -p056
@d=map{$_|=$"x3&"$_ ";$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=/\S*\w\S*/ig;$_="@w"and
s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]/$&/g]
",s/ +$//mg;$v=$a=a
|
Score: 194.33 (pass)
YES!, finally got rid of the stupid extra s/ +$//.
#!perl -p056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map$_|$"x3&"$_ ",/\S*\w\S*/ig;$_="@w"and
s/(.{57}).{3,}\S/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]/$&/g]
",s/ +$//mg;$v=$a=a
|
Score: 198.34 (pass)
Oops, left a ' ' in. $" saves one more stroke.
#!perl -p056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map$_|$"x3&"$_ ",/\S*\w\S*/ig;$_="@w"and
s/ +$//,s/(.{57}).{4,}/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]/$&/g]
",s/ +$//;$v=$a=a
|
Score: 199.35 (pass)
Replace sprintf with more bit-twiddling.
#!perl -p056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map$_|' '&"$_ ",/\S*\w\S*/ig;$_="@w"and
s/ +$//,s/(.{57}).{4,}/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]/$&/g]
",s/ +$//;$v=$a=a
|
Score: 201.32 (pass)
Better way to count matches (s/ +[^.]/$&/g), remove one more newline (all of the remaining ones have some sort of use).
#!perl -p056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map{sprintf'%-3s',$_}/\S*\w\S*/ig;$_="@w"and
s/ +$//,s/(.{57}).{4,}/$1.../,$_=@d.": $_
$v/$a: @d[0..s/ +[^.]/$&/g]
",s/ +$//;$v=$a=a
|
Score: 203.33 (pass)
-p rocks
#!perl -p056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map{sprintf'%-3s',$_}/\S*\w\S*/ig;
(s/ +$//,s/(.{57}).{4,}/$1.../,$_=@d.": $_
$v/$a: @d[0..(@_=/ +[^.]/g)]
",s/ +$//)if$_="@w";$v=$a=a
|
Score: 209.31 (fail)
[^.] -> \w, removed a newline.
#!perl -n056
if(@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map{sprintf'%-3s',$_}/\S*\w\S*/ig){
$_="@w";s/ +$//;s/(.{57}).{4,}/$1.../;$_=@d.": $_
$v/$a: @d[0..(@_=/\s+\w/g)]
";s/ +$//;print}$v=$a=a
|
Score: 209.32 (pass)
Now passes the 1.04 tests. Also reorganized the conditional, and changed a \s into a space.
#!perl -n056
@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x
y...c|@y.'/'.@o}@w=map{sprintf'%-3s',$_}/\S*\w\S*/ig;
(s/ +$//,s/(.{57}).{4,}/$1.../,$_=@d.": $_
$v/$a: @d[0..(@_=/ +[^.]/g)]
",s/ +$//,print)if$_="@w";$v=$a=a
|
Score: 212.31 (pass)
Better accumulator ($v, $a) initialization, hard tabs.
#!perl -n056
if(@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x y...c|@y.'/'.@o}
@w=map{sprintf"%-3s",$_}/\S*\w\S*/ig){$_="@w";s/ +$//;s/(.{57}).{4,}/$1.../;
$_=@d.": $_
$v/$a: @d[0..(@_=/\s+[^.]/g)]
";s/ +$//;print}$v=$a=a
|
Score: 217.31 (pass)
FORE! Should be a decent enough first attempt. Tie-breakers completely unoptimized. Could save a few strokes with literal tabs, but I'll save that for later.
#!perl -n056
($v,$a)=a;if(@d=map{$v+=@y=/[aeiouy]/ig;$a+=@o=/\w/g;$"x y...c|@y."/".@o}
@w=map{sprintf"%-3s",$_}/\S*\w\S*/ig){$_="@w";s/ +$//;s/(.{57}).{4,}/$1.../;
$_=@d.":\t$_
$v/$a:\t@d[0..(@_=/\s+[^.]/g)]
";s/ +$//;print}
|