open my $fh,'<',$filename or die $!; while( my $line = <$fh> ){ print $line unless $line =~ /\./; } close $fh;