Honza was the only golfer to find the clever trick of avoiding
eval by using the s///ee construct.

-nl s/|[aeiouy]/"y!$&!!c%2|$.%2&&next;'$&'"/gee;print   53 honza

I could not restrain myself from whittling this to 49 (see below).
We now have 5 quite different ways to break the 50 barrier!

-p $_ x=1&~$.&split$&while aeiouy=~/.?/g                40 eugen
-p for$a(/[aeiouy]?/g){$_ x=1&~$.&split$a}              42 bob
-p $_ x=1&~$.&~s/$&/$&/gwhile'aeiouy.'=~/./g            44 klem

-p $_ x=eval"\$|--@{[<&y&{a,e,i,o,u,y,}&&c>]}"          46 bob
-p $_ x=1&eval"~$.@{[<&y&{a,e,i,o,u,y,}&&c>]}"          46 bob

-p $==$.&1;$=^=7 .ord for/[aeiouy]?/g;$_ x=!$=          46 ivey(w)
-p $==--$|;$=^=7 .ord for/[aeiouy]?/g;$_ x=!$=          46 ivey(w)

$_=aeiouy;s!!\n\$|--&y-!g;print eval"grep$_--c,<>"      49 ton
-n ($a=aeiouy)=~s!!\n\$|--&y-!g;eval"$a--c"&&print      49 ton

-n s/|[aeiouy]/"1&~$.&y!$&!!c?\$&:next"/gee;print       49 honza(w)
-n s/[aeiouy]?/"1&~$.&y!$&!!c?\$&:next"/gee;print       49 honza(w)

where (w) above denotes "whittled".

/-\ndrew

Reply via email to