@Persons = ( { fistname => "firstname", surname => "lastname", age => 25 place => "place", }, { fistname => "another firstname", surname => "another lastname", age => 25 place => "place", }, # etc etc... ) #### 25 aSurName #### foreach $field (@Fields) { # <- age and surname in this case scalar(@Persons)==0 && return 0; for ($i=0;$i{$field->{key}} eq $field->{content}) && next; # when a match field can not be found in a dataset element, the dataset element can be removed from # the dataset since all match fields have to be found in the dataset element this way the dataset element # does not have to be considdered in the next # iteration (next match field) splice(@Persons,$i,1); $i--; } } #return...