in reply to Re^4: How do I change directory to root directory
in thread How do I change directory to root directory
and /full/path/to/file.txt exists, you have r to the file and x to each directory in the path than it will work.my $file = "/full/path/to/file.txt"; open(FILE, "<", $file) or die "Whoops: $!"; do stuff close(FILE);
If it does not work then there is a permissions issue most likely. (or the file doesn't exist) either way the die will tell you what failed.
|
|---|