in reply to Unopened Filehandle Problem
$file is the file name. You need to read from the file handle ($fh).