http://qs321.pair.com?node_id=1204905

colox has asked for the wisdom of the Perl Monks concerning the following question:

been frying my brain what was wrong with my code as it always fail when it parse the content of the file using tie::file. so i did subset of my code as below & as you can see, simple file test has no error but when i parse the file using tie::file, it throws an issue. please have a look & let me know if i missed anything critical here.

use strict; use warnings; use Tie::File; my $dir = "//folderA/folderB/folderC"; my $file = "//folderA/folderB/folderC/folderD/file.txt"; if (-d -e -r $dir){ print "Folder exists and readable.\n";} if (-f -e $file){ print "File exists and accessible.\n";} tie my @content, 'Tie::File', $file or die "Cannot open $file for read +ing."; Folder exists and accessible. File exists and accessible. Cannot open //folderA/folderB/folderC/folderD/file.txt for reading. at + te st.pl line 14.