title: Perl - Print output to files in a different directory
body: <p>Good morning!</p>
  
  <p>I am sorry if this has been posted before - I could not find it. I just need a little point into the right direction, this is my homework and I feel it is almost done. What I want to do is take data from files in a different folder from where the script is run, process the data inside Perl, then print the output to another directory. Now I got the two parts done, but what I fail with is that Perl does not find the path to where I want to save the files. It just sais "No file or directory with that names exists", but it does! Here is the part of the script for that:</p>
  
  <pre><code>my @files = &lt;$ENV{HOME}/Docs/unprocessed/*.txt&gt;;
  my $path = "$ENV{HOME}/Docs/results";
  
  &lt;looping through @files, processing each file in the unprocessed folder...&gt;
  
  open (OUTFILE, $path . '&gt;$file') or die $!;
  print OUTFILE ""; # "" Is really the finished calculations from the loop, not important here.
  close FILE;
  close OUTFILE;
  </code></pre>
  
  <p>I bet its something stupid...</p>