my $file = '/path/to/file'; { local $/ = "\n\n"; open(my $fh,"<$file") or die $!; while(my $entry = <$fh>){ # bearbeite Datensatz } close $fh; }