Use of uninitialized value $file in concatenation (.) or string at readfile.pl line 7. Use of uninitialized value $file in concatenation (.) or string at readfile.pl line 7. Could not open file ,No such file or directory at readfile.pl line 7.

file.txt created on the same directory as my script. Version:

This is perl 5, version 22, subversion 2 (v5.22.2) built for darwin-2level