in reply to Re^2: Sort over remaining part of array
in thread Sort over remaining part of array

Well, at a glance it looks like $j will remain zero forever...