title: How can I take a reference to a Perl subroutine?
body: <p>I'm having some trouble figuring out how to make a reference to a subroutine in an external module file. Right now, I'm doing this:</p>
  
  <p>External file</p>
  
  <pre><code>package settingsGeneral;    
  sub printScreen {
      print $_[0];
  }
  </code></pre>
  
  <p>Main</p>
  
  <pre><code>use settingsGeneral;    
  my $printScreen = settingsGeneral::printScreen;
  &amp;$printScreen("test");
  </code></pre>
  
  <p>but this result into an error:
  Can't use string ("1") as a subroutine ref while "strict refs" in use </p>