in reply to Re^4: check parameters
in thread check parameters

Or this? (Observe the position of the exclamation mark.)

if ( grep { !/^$str/i } keys %$format)