open my $fh, "<", "adressen.txt" or die $!; local $/ = "jetzt eintragen!\n"; # als paragraphentrenner betrachten chomp(my @p = <$fh>); for my $paragraph (@p) { my (undef, $name, $address) = split /\n/, $paragraph; my ($street, $city, $phone) = split / (?=\d{5} |\(\d{3,5}\) )/, $address, 3; print "$name | $street | $city | $phone\n" }