sub mk { join '', sort @_ } $hash{ mk 'a', 'b' } = 'Some Value'; print $hash{ mk qw{ b a } }; #### if ( $tests{ $refA } && $tests{ $refB } ) { # This checks two hash entries very cleanly, but falls down # if the results are dependent on whether A and B are tested together. # some stuff }