title: How can I detect the file type of image at a URL?
body: <p>How to find the image file type in Perl form website URL?</p>
  
  <p>For example, </p>
  
  <pre><code>$image_name = "logo";
  $image_path = "http://stackoverflow.com/content/img/so/".$image_name 
  </code></pre>
  
  <p>From this information how to find the file type  that . here the example  it should display </p>
  
  <p><code>"png"</code></p>
  
  <pre><code>http://stackoverflow.com/content/img/so/logo.png . 
  </code></pre>
  
  <p>Supposer if it has more files like SO web site . it should show all file types </p>