| File::Spec
abs2rel & rel2abs
use File::Spec; $rel_path = File::Spec->abs2rel( $path ) ; $rel_path = File::Spec->abs2rel( $path, $base ) ; $abs_path = File::Spec->rel2abs( $path ) ; $abs_path = File::Spec->rel2abs( $path, $base ) ; |
- abs2rel() takes a destination path and an optional base path returns a relative path from the base path to the destination path
- rel2abs() converts a relative path to an absolute path
|