in reply to Re: How do I get the directory containing a given file?
in thread How do I get the directory containing a given file?
use Cwd qw(abs_path); use File::Basename; my $dir = dirname(abs_path("../foo.html"));<BR> print "dir is ($dir)\n";
yields:
opendir(../foo.html/..): Not a directory at text.pl line 4 dir is ()
Other ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Answer: How do I get the directory containing a given file?
by wog (Curate) on Feb 24, 2002 at 20:02 UTC |