title: Output streams in Perl: STDERR, STDOUT,
body: <p>I know the output streams STDOUT and STDERR. Whenever you print to STDOUT, in a unix shell you can redirect the output like this...</p>
  
  <pre><code>deviolog@home:~$ perl test_script.pl &gt; output.txt
  </code></pre>
  
  <p>or</p>
  
  <pre><code>deviolog@home:~$ perl test_script.pl 1&gt; output.txt
  </code></pre>
  
  <p>When you print to STDERR, it looks the same but you switch to "channel" (?) number 2:</p>
  
  <pre><code>deviolog@home:~$ perl test_script.pl 2&gt; output.txt
  </code></pre>
  
  <p>I can find in output.txt, what I was printing as error output then.</p>
  
  <p>My question is, can I access "channel" number 3 somehow?
  Is there something like ...</p>
  
  <pre><code> print STDX "Hello World!\n";
  </code></pre>
  
  <p>... that allows a redirection like the following one?</p>
  
  <pre><code>deviolog@home:~$ perl test_script.pl 3&gt; output.txt
  </code></pre>
  
  <p>p.s. A subquestion would be about the term for those "channels" ^_^</p>