title: Perl function declaration
body: <p>This is kindof a Perl n00b question, but I did not find a clear and understandable by me answer online.</p>
  
  <p>I have this code:</p>
  
  <pre><code>1.sub remCH();
  2.#some stuff
  3.$line = remCH($line);
  4.
  5.sub remCH() {
  6.$rem = shift;
  7.$rem = chomp($rem);
  8.return ($rem);
  9.}
  </code></pre>
  
  <p>I always get the following error when executing this code (line 24 would be line 3 in the above code):</p>
  
  <pre><code>Too many arguments for main::rem_CRLF at ./make_csv.pl line 24, near "$line)" 
  </code></pre>
  
  <p>From what I understand it is because the function is set to return something but when I declared it, it was declared as "void". </p>
  
  <p>How do I declare a function like below???</p>
  
  <pre><code>sub remCH(string/integer);
  </code></pre>