title: why do i get error 500 with this perl code?
body: <p>Here is my perl code located in /perl-bin/ directory but for some reason when i try to get something from MySQL i keep getting Error 500</p>
  
  <p>here is the code</p>
  
  <pre><code>#! /usr/bin/perl
  
   use warnings;
   use strict;
  
   print "Content-type: text/html\n\n";
   print "&lt;!DOCTYPE html&gt;\n";
   print "&lt;html&gt;\n";
   print "&lt;head&gt;\n";
  
   print "&lt;title&gt;00000000000000000000&lt;/title&gt;";
   print "&lt;link rel='stylesheet' type='text/css' href='style.css' /&gt;";
  
   print "&lt;/head&gt;\n";
   print "&lt;body&gt;\n";
  
   print "&lt;div id='top'&gt;&lt;/div&gt;";
   print "&lt;div id='header'&gt;";
   print "&lt;div id='logo'&gt;&lt;/div&gt;";
  
   print "&lt;/div&gt;";
  
   use Mysql;
  
  # MYSQL CONFIG VARIABLES
  $host = "localhost";
  $database = "000_ooo";
  $tablename = "users";
  $user = "000_root";
  $pw = "l00V0r009;00XE_%0q;U00000000000000";
  
  # PERL MYSQL CONNECT()
  $connect = Mysql-&gt;connect($host, $database, $user, $pw);
  
  # SELECT DB
  $connect-&gt;selectdb($database);
  
  # DEFINE A MySQL QUERY
  $myquery = "SELECT * FROM $tablename";
  
  # EXECUTE THE QUERY FUNCTION
  $execute = $connect-&gt;query($myquery);
  
  # HTML TABLE
  print "&lt;table border='1'&gt;&lt;tr&gt;
  &lt;th&gt;id&lt;/th&gt;
  &lt;th&gt;product&lt;/th&gt;
  &lt;th&gt;quantity&lt;/th&gt;&lt;/tr&gt;";
  
  # FETCHROW ARRAY
  
  while (@results = $execute-&gt;fetchrow()) {
      print "&lt;tr&gt;&lt;td&gt;"
      .$results[0]."&lt;/td&gt;&lt;td&gt;"
      .$results[1]."&lt;/td&gt;&lt;td&gt;"
      .$results[2]."&lt;/td&gt;&lt;/tr&gt;";
  }
  
  print "&lt;/table&gt;";
  
   print "&lt;/body&gt;\n";
   print "&lt;/html&gt;\n";
  </code></pre>