Re: trouble merging files using nested loop to read files



theshowmecanuck (BillR) wrote:

Now I need to find a way to move the file pointer back one record when I
need to. :-)

The example at the end of
perldoc -f seek
shows how it is done. Just keep track of what the current position
was before the read that went to far.

Or write a routine to read_a_line() and one to unread_a_line().
Make the latter put a string into a global variable, and the
former return the content of that variable (instead of reading
input) if the variable is set.

-Joe
.