title: How can my Perl script determine whether an Excel file is in XLS or XLSX format?
body: <p>I have a Perl script that reads data from an Excel (<code>xls</code>) binary file.  But the client that sends us these files has started sending us <code>XLSX</code> format files at times.  I've updated the script to be able to read those as well.  However, the client sometimes likes to name the <code>XLSX</code> files with an <code>.xls</code> extension, which currently confuses the heck outta my script since it uses the file name to determine which file type it is.</p>
  
  <p>An <code>XLSX</code> file is a zip file that contains XML stuff.  Is there a simple way for my script to look at the file and tell whether it's a zip file or not?  If so, I can make my script go by that instead of just the file name.</p>