foreach $f(@found) { if ($max !~ /$f/) { ($id)=split(/\|/,$f); push @set, $id; } }