my %hash1 = map { getkey($_) => $_ } grep { !/^f/ } @array;