title: How do I get elements of a hash whose keys match a given regex?
body: <p>How do I get elements of a hash whose keys match a given regex? without usign any module (e.g Tie::RegexpHash)  </p>
  
  <p>How to achieve this ? </p>
  
  <pre><code>%s = (
          'as2-queen' =&gt; 1 ,
          'as1-queen' =&gt; 2,
      );
  
  
  my $regex = qr/queen/ ;
  
  if ( $s{$regex}) {
    print " I am here " ;
  }
  </code></pre>
  
  <p>~</p>