ton's solutions

2003-07-10 Thread Shlomi Fish
It seems to me that both ton's solution and his alternative solution are incorrect: <<< $ perl foresttest.pl Hole 'forest' forest.pl: Running test 1 ... (args: 7 9 6 3) Unexpected STDOUT: Expected: ** ** * * * *** *@ *** * * * ** ** * * * * but got: @@ @@ @ @ @ @@@

Re: ton's solutions

2003-07-10 Thread Ton Hospel
In article <[EMAIL PROTECTED]>, Shlomi Fish <[EMAIL PROTECTED]> writes: > It seems to me that both ton's solution and his alternative solution are > incorrect: > What gives? > probably means it's wrong, though i thought what I did was actually portable. What is your perl version ? What is

Re: ton's solutions

2003-07-10 Thread Shlomi Fish
On Thu, 10 Jul 2003, Ton Hospel wrote: > In article <[EMAIL PROTECTED]>, > Shlomi Fish <[EMAIL PROTECTED]> writes: > > It seems to me that both ton's solution and his alternative solution are > > incorrect: > > What gives? > > > probably means it's wrong, though i thought what I did was actu

Re: ton's solutions

2003-07-10 Thread Ton Hospel
In article <[EMAIL PROTECTED]>, Shlomi Fish <[EMAIL PROTECTED]> writes: >> perl -wle 'print+(0..3)[2**32]' > > 3 > Ok, I totally misjudged what would happen on 32-bit perls, so my solution is wrong. It's easy enough to fix at the cost of a few strokes (e.g. using 188/~- instead of 1<< is