my %want_global = map { ($_ => 1) } qw( THIS THAT ANOTHER ); ... if ( $want_global{$global} ) { ... }