http://qs1969.pair.com?node_id=679582


in reply to cwd module

May I recommend File::chdir (yes, note the case :), which makes it simple to not just get the current dir, but also to change dir. And restore it later by just doing

local $CWD = $new_dir;.

/J