En op 12 juni 2002 sprak Geldenhuys Willie:
> yesterday evening i looked at Eugene van der Pijll's 311.34 solution
> (it was the closest to mine, except that mine didn't cope with >60 line
> sentences well enough to pass the test program and i want to know what
> i did wrong.).
>
> $v=s/[aeiouy]/$&/gi is undefined iso 0 if no vowels were found.
> so one must change that as follows:
> $v=s/[aeiouy]/$&/gi||0;

Well spotted. Eugene's 311.34 solution as reported in the
post-mortem fails the test program. I think this was the first
solution received, so I suspect the judges were using a more
primitive version of the test program which did not check
the zero vowel case.

Your fix:
  $v=s/[aeiouy]/$&/gi||0;
fixes it, as does:
  $v=0+s/[aeiouy]/$&/gi;

If (-ugene is retrospectively stripped of the "first
working submission" title, who does it go to?
Surely not `/anick? Not sure, but I think one of
(-ugene's later submissions would get the nod.

/-\ndrew

Reply via email to