Since you know the size of each MD5 hash (128 bits aka 16 bytes),
you could just read in 17 bytes at a time (to include the newline).
You can do this by either using
read (or
sysread),
or to set
$/ to a reference to 17. (On a DOSish system
you may actually have to read in 18 bytes, to deal with the
end of line sillyness.)
Abigail