title: PDF not showing in browser when read through a perl script
body: <p>I'm trying to read in a file to my perl script and then set the headers appropriately based on the filetype. PDFs are not displaying and i'm thinking that my server guy has this thing locked down. Is there anything that I may be doing wrong with this script?</p>
  
  <pre><code>my $q = CGI-&gt;new;   #instantiate the CGI object
  my $filename = $q-&gt;param('file');   # get the file param from the query string
  my $text = read_file($filename);    # read in the file
  
  my($name, $path, $suffix) = fileparse($filename, qr/\..*/);
  
  if($suffix eq ".pdf") {
      print $q-&gt;header('Content-type: application/pdf');
  } else {
      print $q-&gt;header('text/html');
  }
  </code></pre>