# If $class has feature A if( substr $cases{ $class }, FEATURE_A ) ) {... # Add feature G to $class substr $cases{ $class }, FEATURE_G = '1';