File::chdir gives you an alternative, $CWD and @CWD. These two variables combine all the power of chdir(), File::Spec and Cwd.
... part of T2, get it here
URL: https://metacpan.org/pod/File::chdir
Author: David Golden <dagolden [at] cpan [dot] org>
Author: Michael G. Schwern <schwern [at] pobox [dot] com>
Maintainer: Dragos C <dragoscdebug [at] proton [dot] me>
License: Artistic
Status: Beta
Version: 0.1011
Download: https://www.cpan.org/authors/id/D/DA/DAGOLDEN/ File-chdir-0.1011.tar.gz
T2 source: perl-file-chdir.cache
T2 source: perl-file-chdir.desc
Build time (on reference hardware): 1% (relative to binutils)2
Installed size (on reference hardware): 0.05 MB, 11 files
Dependencies (build time detected): bash coreutils diffutils gawk grep gzip make perl sed tar
Installed files (on reference hardware): n.a.
1) This page was automatically generated from the T2 package source. Corrections, such as dead links, URL changes or typos need to be performed directly on that source.
2) Compatible with Linux From Scratch's "Standard Build Unit" (SBU).