title: Print a string separated by dots in reverse order
body: <p>I need to print a string in reverse order in bash shell.</p>
  
  <pre><code>[deeps@host1:~]echo maps.google.com|rev
  moc.elgoog.spam
  [deeps@host1:~]
  </code></pre>
  
  <p>But I need it as "com.google.maps". I need it in general for any string separated by period (<code>.</code>).</p>
  
  <p>It should print in reverse order. How do I do that?</p>
  
  <p>I need the solution in Perl as well.</p>