I don't fully understand the code that you wrote Glenn. But my take on the issue would be this.

Is the way that readprofilestring currently works returning the intended result? I would not focus on whether it's technically a bug, but what the expected result of the command should be.

Using Shane's example he is getting Printer1-Printers 4 after listing the actual printers, which is clearly not the intended result of the readprofilestring. It sounds to me that the issue is the way that readprofilestring determines what is on a line creating four fields instead of three. So the code is technically correct, but is not returning the intended result unless an extra bit of coding is added such as trim, left or not equal to 0 etc to remove the last line.

The process is not important, the outcome is.