Hello Mtve!

> > -lp /.+()(?{$n|=(${"@-"}.=$&)x=-index$&,0})^/}{$_=length$n
> >
> > I get 56 instead of 16 on the first test in the testsuite for the above
> > solution.
>
> What's your perl version?

Version 5.8.0 on Windows 2000, but I have another hypothesis for the
difference.

I'm using Vim 6.2 as my editor, and instead of downloading Ton's solution, I
copied it into Vim and saved. (I need to do this because when I download
solutions directly, the windows perl version has trouble identifying
switches when they are not preceded by a shebang.) I noticed also that Vim
has a File Format option where you can specify Unix, Dos, or Mac.

When I save in Unix format (which was the format Vim was using by default),
I get 56. I tried saving in Dos format and got the appropriate 16.

So now the big question: how is my editor saving formats in such a way that
the solution runs as expected in Dos format, but not in Unix format? I
thought the main difference in the two formats was in how carriage returns
are saved, but maybe there's something more...

-Riley
(o0lit3)


Reply via email to