open my $fh, "/path/to/file"; while (<$fh>) { chomp; ... }