#!/usr/bin/perl use strict; use warnings; my $file = '/pfad/zur/datei.txt'; my @all_lists; { local $/ = "\nArbeitsplatz"; open my $in, '<', $file or die $!; while( my $entry = <$in> ){ chomp $entry; $entry = "Arbeitsplatz" . $entry unless $entry =~ /^Arbeitsplatz/; push @all_lists, $entry; } close $in; } print "Neue Liste: $_\n" for @all_lists;