my %config = map { $_ => 1 } split(',', $CD); ## later on... if ( $config{L} ) { print "L was set!" }