title: perl print statement
body: <p>can anybody explain  me this print statement in the following perl program.</p>
  
  <pre><code>#! /usr/bin/perl 
  use strict; 
  
  my %hash; 
  
  &amp;Parse('first.txt'); 
  &amp;Parse('second.txt'); 
  
  my $outputpath = 'output.txt'; 
  unlink ($outputpath); 
  open (OUTPUT, "&gt;&gt;$outputpath") || die "Failed to open OUTPUT ($outputpath) - $!"; 
  print OUTPUT "$_ \t" . join("\t", @{$hash{$_}}) . "\n" foreach (sort keys %hash); 
  close (OUTPUT) || die "Failed to close OUTPUT ($outputpath) - $!"; 
  
  sub Parse { 
      my $inputpath = shift; 
      open (INPUT, "&lt;$inputpath") || die "Failed to open INPUT ($inputpath) - $!"; 
      while (&lt;INPUT&gt;) { 
          chomp; 
          my @row = split(/\t/, $_); 
          my $col1 = $row[0]; 
          shift @row; 
          push(@{$hash{$col1}}, @row); 
      } 
      close (INPUT) || die "Failed to close INPUT ($inputpath) - $!"; 
      return 1; 
  }
  </code></pre>
  
  <p>this is the statement:</p>
  
  <pre><code>   print OUTPUT "$_ \t" . join("\t", @{$hash{$_}}) . "\n" foreach (sort keys %hash); 
  </code></pre>