in reply to read multiple files

use a different file handle for each file or reuse the file handle. You might want to read up on the open statement;-)