sub getDatensatz{ my ($entry) = @_; my $bool = 0; my $warte_auf_flanke = 0; my $set = ''; my @fallend; for my $line(split(/\r?\n/,$entry)){ chomp $line; my $wert = (split(/\s+/,$line))[-1]; if($wert > 4.8) { $warte_auf_flanke = 1; } if($warte_auf_flanke and $wert < 4) { $warte_auf_flanke = 0; $bool = 1; } unless($bool){ push(@fallend,$line); } else{ $set .= $line."\n"; } } $set .= $_."\n" for(@fallend); $set .= "\n\n"; return $set; }