my $tmp_treffer; my @unique = grep{ index($GanzeUrl,$DomainName) != 0 and $Treffer <= $tmp_treffer and $tmp_treffer = $Treffer }@ausgangsarray