title: How can I suppress STDOUT temporarily in a Perl program?
body: <p>Is there any easy way to tell perl "now ignore everything that is printed"?</p>
  
  <p>I have to call a procedure in an external Perl module, but the procedure prints a lot of unnecessary information (all through standard <em>print</em>). </p>
  
  <p>I know <em>select</em> can be used to redirect it somehow, but I am not too wise from reading <em>perldoc</em> on it.</p>
  
  <p><strong>edit</strong>: I found the answer sooner, but I will add an example to make it clearer (but not much I guess)</p>
  
  <pre><code>use TectoMT::Scenario;
  use TectoMT::Document;
  
  sub tagDocuments {
      my @documents = @_;
  
      my $scenario = TectoMT::Scenario-&gt;new({'blocks'=&gt; [ qw(
              SCzechW_to_SCzechM::Sentence_segmentation 
              SCzechW_to_SCzechM::Tokenize  
              SCzechW_to_SCzechM::TagHajic
              SCzechM_to_SCzechN::Czech_named_ent_SVM_recognizer) ]});
  
      $scenario-&gt;apply_on_tmt_documents(@documents);
      return @documents;
  }
  </code></pre>
  
  <p>TectoMT::Scenario and TectoMT::Document are those external modules</p>