in reply to Merged list with regex matches

Build a single regex out of the components of @B_CHECKS (possibly using Regexp::Assemble or the like, or even a crude join( "|", map { "\Q$_\E" } @B_CHECKS)) which captures the variant part and use that instead.