$ perl -MFile::Basename -le 'print dirname("/htdocs/project1/docs/file.html")' /htdocs/project1/docs