use Cwd qw(abs_path); use File::Basename; my $dir = dirname(abs_path("../foo.html"));
print "dir is ($dir)\n";