http://www.perlmonks.org?node_id=1001588


in reply to Re^2: Forcing array context on a file handle
in thread Forcing array context on a file handle

After you read a file you have to rewind it with seek if you want to read it again from the beginning. Here is how to set the filehandle back to the beginning of the file.

seek $fh, 0, 0;