# %hash is a hash with values for one/two/tre/for sub t_exists { 1 if exists $hash{one}; 1 if exists $hash{two}; 1 if exists $hash{tre}; 1 if exists $hash{for}; 1 if exists $hash{xxx}; 1 if exists $hash{xxy}; 1 if exists $hash{xxz}; 1 if exists $hash{xyx}; } ...