if ( scalar( grep { /^$pattern/i } keys %$format ) < scalar( keys %$format ) ) { ...