in reply to Re^3: Buffering and output help needed
in thread Buffering and output help needed

You are right, i needed to local scope the varibles in the sub routine, name them more clearly.

I'd remembered about return exiting the sub routine and just finshed altering my code so that it worked like yours but with poor varible scoping and naming.

It was good to see the difference.