http://qs321.pair.com?node_id=50119


in reply to Re: Re (tilly) 1: What Happened...(perils of porting from c)
in thread What Happened...(perils of porting from c)

The reason for removing the return statement is that you are not supposed to use that outside of functions (eval, do).

Just end with:

1;
and it will work.

As for the pointer logic, sorry. No energy to go through it. It looked like a mess FWIW. I would just use recursion for this problem. (OK, so you take a performance hit.)