.: monkey-mind :. |
sheep go to heaven, goats go to hell |
Converting relative pathnames to absolute pathnamesThe File::Spec module has the rel2abs() subroutine that converts a relative filename to an absolute path. However, it does not remove “./” and “../” components from the path. This is ugly. I wrote an alternative that fixes this. Please note the following:
If you run the abs2rel.pl script you get the following results: $ perl rel2abs.pl ./some/../or/../all /here/../there/../anywhere/but/../../here rel2abs(): /here/all File::Ext->rel2abs(): /here/../there/../anywhere/but/../../here/some/../or/../all |
||