in reply to Re^2: problem with string substitution output
in thread problem with string substitution output

Unsuccessful open on filename containing newline at test.pl line 18
This tells you that have to remove the newlines from the lines you are reading from your file list:
while (<DFFILE>) { chomp; # remove newline at the end. ($value, $key) = split(/\t/, $_); $lijst{$key} = $value; }

Replies are listed 'Best First'.
Re^4: problem with string substitution output
by Anonymous Monk on May 23, 2008 at 16:39 UTC
    I know about chomp and I'm pretty sure that's not the problem, since I already tried that ;)
    It also wouldn't explain why writing it with parentheses does work. But thanks anyway! Matje
      So where does your newline in the file name come from? Use Data::Dumper to investigate.

      If the three-argument form of open (open my $handle, $mode, $filename;) bails out it's not open's fault - you provided the wrong inputs. If you don't believe it, print the file name before:

      use Data::Dumper; print "Trying to open file this file: ", Dumper($file); open my $f, '<', $file or die ...;