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