title: Perl to Python Conversion issues: Regex interpretation
body: <p>I have been trying to convert some code from Perl to Python. I'm having issues in understanding regular expression used in Perl since I never learned Perl before.</p>
  
  <p>Can anyone please help me understand the below line of code?</p>
  
  <pre><code>$seqfile =~ /(\S+)\.txt/
  </code></pre>
  
  <p><strong>********New Question:************</strong></p>
  
  <p>Below, the variable 'name' has string value associated with it. How come the following line updates(use of ++) the value of hash variable(hash_lib) as if it's an integer value.
  if it's a hash why doesn't it use a '%' when declaring hash variable. Can you create a hash with '$'?</p>
  
  <pre><code> $hash_lib{$name}++;
  </code></pre>
  
  <p>Another thing is, can we create hash with two keys for a single value? if so, what would be python equivalent of the following line?</p>
  
  <pre><code> $hash_abun{$name}{$seq}= $abun;
  </code></pre>