Sigh. My fault for posting untested code.
You are still missing the point about using Cwd. You don't need the chdir and you shouldn't rely on $ENV{PWD}. Here is a (tested) version showing what I mean.
use warnings; use strict; use Cwd; my $curr_dir = cwd(); my $info_file = $curr_dir . '/../htdocs/info.txt'; open my $fh, '<', $info_file or die "Could not open file, $!"; while (my $line = <$fh>){ # process text }
In reply to Re^3: File Open Issue
by thundergnat
in thread File Open Issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |