I'm sharing this because although I feel like an idiot, my stupid mistake is very mildly amusing and more importantly, maybe I can spare someone a headache in the future if they happen to be making my mistake.
I did this one with a php script, same as I did the other programming missions I've done, that logs itself into the site, gets the source for the challenge, then posts the responses back to the site - ran in to two problems though.
First, the additional requirement this time of posting submit as well as the solution held me back for a full half hour
- I had to check the forums to find this out, which I try to do only if I'm absolutely stumped.
Secondly, and more stupidly, my program kept coming back with the wrong product at the end. What I did for the program was to parse the source, duplicate the string, loop for the number of characters in the string, deal with the first character accordingly, then chop off the first character before the string repeats.
After manually verifying (several times) that it was sorting primes and composites correctly, I decided to see how many times the loop was iterating - and it was always half the length of the original string.
It turns out I had set the loop to iterate as many times as the number of characters in the string I was chopping up
instead of the original. Therefore, when the two equalized (halfway point), it quit looping. D'OH!
Changed it to count the characters in the ORIGINAL, UNMODIFIED string, and it worked the first time I ran it.
tl;dr: If you're using string length as the number of times your loop should loop, make sure it's not a string that you're gradually shortening, especially if you've already duplicated the string for safekeeping.
thanks to Defience for posting examples to test against - I wonder how long it would have taken me to catch my mistake without that.