Good Habits for More Secure Coding 

open my $fh, $filename or die ...
open my $fh, '<', $filename or die ...
while(<>) {
  ...
}