in reply to Converting FILEHANDLE to string

You could do better if you rewind the file with seek FILE, 0, 0; before trying to read it again.