title: Getting the file extension and uppercasing it (Perl)
body: <p>How can I make this piece of my code terser (in one line) but still understandable.</p>
  
  <pre><code> ($ext) = $ARGV[0] =~ /(\.[^.]+)$/;
   $ext=~s/^.//s;
   $ext=uc $ext;
  </code></pre>
  
  <p>It gets the file extensions, remove the dot and then uppercase it.</p>
  
  <pre><code>in: asldaldjlajdlk.torrent
  out: TORRENT
  </code></pre>