in reply to read(x,y,z)

Make sure $file is a file handle and not just a scalar with the path to the file you are wanting to work with.

-----------------------------------
Frank Wiles <frank@wiles.org>
http://frank.wiles.org