Thanks for all the advice. I've always appreciated how constructive the criticism is here...i in no way took that as an assault.
That bit of code to which you referred kept being repreated in every article I found on unbuffering output. It was usually written for file handles other than STDOUT, but since nothing else i'd tried had worked (thanks to '-p') I tried it. It did look odd to me, but "all the articles were doing it".
Now, that I've taken out the -p, I'll rip out the superfluous lines as well.