in reply to Re^2: peek at STDIN, to determine data type and then pass STDIN to a parser
in thread peek at STDIN, to determine data type and then pass STDIN to a parser

Nothing if you are just reading. The benefit can arise if you want to rearrange, inject, or modify the incoming data on the file handle and make the resulting stream look like a plain old file handle. I understand the OP to want to maybe inject a proper doctype into the data stream if needed.

Perhaps not the best tool for this particular case, but a tool for the generic case.

--MidLifeXis

  • Comment on Re^3: peek at STDIN, to determine data type and then pass STDIN to a parser