... open my $dateiHandle, "<", "test.osm" or die $!; while (my $line = <$dateiHandle>) { ... }