if ($fh == $lsn) { # this does not do what you think it does