while ( ){ # no blanks araound IN ... while ( <$fh> ){ # dito #### open (IN, "<", $dir/$file")