in reply to How to 'peek' at next line while parsing with <>
But you can use a buffer. The simplest is a one-scalar buffer. If you want to look, read in the line in a scalar, later, if you want to process the line, process the scalar. You can wrap this up in a module, and if you want to be fancy, you tie it to a filehandle. Or with perl 5.8, you should be able to write an IO layer that does that for you.
Abigail
|
|---|