in reply to Re^4: PERL $/variable
in thread PERL $/variable

You could, or you could skip blank lines
while (<$fh>) { chomp; next if !length; ... }