title: How to include a config type file in a perl script
body: <p>Okay , I'm giving up and asking for help;</p>
  
  <p>I have a script to access info in my MySQL database. I want my credentials buried in a file I can include for security. To make it even I little neater, I tried to create a sub directory (include) in my cgi-bin directory.</p>
  
  <p>This is a simple example omitting all the db stuff (because that's not my problem).</p>
  
  <h3>config.pl (inside the include dir)</h3>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  
  $data_base = 'dbi::mysql::test_db';
  $db_user = 'some_user';
  $db_pw = 'password';    
  </code></pre>
  
  <h3>test_driver.pl (inside the cgi-bin directory)</h3>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  use DBI;
  
  require'/include/config.pl';
  
  $param1 = $data_base;
  $param2 = $db_user;
  $param3 = $db_pw;
  </code></pre>
  
  <p>The first error I'm getting is cannot find include. I've also seen many posts that show adding <code>our</code> in front of the vars. Also most posts mention not using <code>require</code> at all, but for simple things I would rather.</p>
  
  <p>I ended up following some tutorials on how to make a Module. I got it to work but that seems like a lot of effort for a simple config file.</p>