title: How can I split my Perl code across multiple files?
body: <p>My scripts are getting too long. How do I split my code (procedural subs) into multiple Perl files and tell the interpreter to make sense of them?</p>
  
  <p>Kind of like:</p>
  
  <pre><code># -&gt; main.pl
  
  #include "foo.pl"
  say_hello();
  </code></pre>
  
  <p>and:</p>
  
  <pre><code># -&gt; foo.pl
  sub say_hello {print "hello!"}
  </code></pre>