clock is ticking!
#!perl -ap056
@q=map{s/$/ /until/\.|...$/g;$"x++pos|($Q=lc=~y/aeiouy//."/".y/0-9A-z//)}@F,$_;s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]//g]
",s/ +$// if$_="@F"
|
Can't seem to make much progress with the "do$0" approach.
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/0-9A-z//}$Q=f;@q=map{s/$/ /until/\.|...$/g;$"x++pos|f}@F;s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]//g]
",s/ +$// if$_="@F"
|
don't need $&- interesting
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//|$"x++pos}$Q=f;@q=map{s/$/ /until--pos>!/\./;f}@F;s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]//g]
",s/ +$// if$_="@F"
|
guess not!
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//}@q=map{s/$/ /until--pos>!/\./;f|$"x++pos}@F;$Q=f,s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]/$&/g]
",s/ +$// if$_="@F"
|
end of the line?
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//}@q=map{s/$/ /until/\./|--pos>1;f|$"x++pos}@F;$Q=f,s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]/$&/g]
",s/ +$// if$_="@F"
|
?: to if(){}
#!perl -ap056
if(//){@q=map{s/$/ /until/\.|...$/g;$"x++pos|do$0}@F,$_;s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]//g]
",s/ +$// if$_="@F"}$Q=lc=~y/aeiouy//."/".y/0-9A-z//
|
rework the "$_=" part
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//|$"x++pos}@q=map{s/$/ /until--pos>1;f}@F;$Q=f,s/ $//,s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]/$&/g]
",s/ +$// if$_="@F"
|
third approach: build around do$0
#!perl -ap056
//?do{@q=map{s/$/ /until/\.|...$/g;$"x++pos|do$0}@F,$_;s/(.{57}).{4,}/$1.../,$_=@F.": $_
$Q: @q[0..s/ [^ .]//g]
",s/ +$// if$_="@F"}:($Q=lc=~y/aeiouy//."/".y/0-9A-z//)
|
don't need the *-qualifier in s/ *$//
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//}@q=map{s/$/ /until--pos>1;f|$"x++pos}@F;s/ $//,$V=f,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V: @q
"if$_="@F"
|
get rid of join
#!perl -ap056
sub f{lc=~y/aeiouy//."/".y/A-z0-9//}$V=f;@q=map{s/$/ /until--pos>1;f|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V: @q
"if$_="@F"
|
second attempt: build around a sub
#!perl -ap056
sub f{join"/",lc=~y/aeiouy//,y/A-z0-9//}$V=f;@q=map{s/$/ /until--pos>1;f|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V: @q
"if$_="@F"
|
replace other y/// with m//g
#!perl -ap056
$V=$L=0;@q=map{$L+=@p=/\w/g;$V+=@n=/[aeiouy]/gi;s/$/ /until--pos>1;@n."/".@p|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|
dump silly "."
#!perl -ap056
$V=$L=0;@q=map{$L+=@p=/\w/g;s/$/ /until--pos>1;$V+=$n=lc=~y#aeiouy##;"$n/".@p|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|
use regexp for letter count
#!perl -ap056
$V=$L=0;@q=map{$L+=@p=/\w/g;s/$/ /until--pos>1;$V+=$n=lc=~y#aeiouy##;$n."/".@p|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|
replaced pack with a bit twiddler.
#!perl -ap056
$V=$L=0;@q=map{s/$/ /until--pos>1;$V+=$n=lc=~y#aeiouy##;$L+=$d=y#A-z0-9##;"$n/$d"|$"x++pos}@F;s/ *$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|
lowered tiebreaker; >>1 and "A" now >1 and A.
#!perl -ap056
$V=$L=0;@q=map{s/$/ /until--pos>1;$V+=$n=lc=~y#aeiouy##;$L+=$d=y#A-z0-9##;pack A.++pos,"$n/$d"}@F;s/ +$//,s/(.{57}).{4,}/$1.../,$q[$#q=@p=/ [^ .]/g]=~s/ //g,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|
first attempt
#!perl -ap056
$V=$L=0;@q=map{$_.=$"until--pos>>1;$V+=$a=lc=~y#aeiouy##;$L+=$b=y#A-z0-9##;pack"A".++pos,"$a/$b"}@F;s/ +$//,s/(.{57}).{4,}/$1.../,$q[$#q=()=/ [^ .]/g]=~y/ //d,$_=@F.": $_
$V/$L: @q
"if$_="@F"
|