# warning! untested code ahead use File::VirtualPath; my $p = File::VirtualPath->new(); $p->path("/home/myuser"); # or use cwd() $p->chdir("../bob/"); print $p->path_string(); # should yield /home/bob