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?
In reply to Re: Answer: How do I get the directory containing a given file?
by mobiGeek
in thread How do I get the directory containing a given file?
by mobiGeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |